1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

$k - first character in CMDCHARS

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2955 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-10-14 18:24:22 +00:00 committed by cras
parent fb5c4c8037
commit 98316be40d
2 changed files with 14 additions and 0 deletions

View File

@ -62,6 +62,7 @@ $A .. $Z is important.
$I channel you were last INVITEd to $I channel you were last INVITEd to
$J client version text string $J client version text string
$K current value of CMDCHARS $K current value of CMDCHARS
$k first character in CMDCHARS
$L current contents of the input line $L current contents of the input line
$M modes of current channel, if any $M modes of current channel, if any
$N current nickname $N current nickname

View File

@ -318,6 +318,17 @@ static char *expando_cmdchars(SERVER_REC *server, void *item, int *free_ret)
return (char *) settings_get_str("cmdchars"); return (char *) settings_get_str("cmdchars");
} }
/* first CMDCHAR */
static char *expando_cmdchar(SERVER_REC *server, void *item, int *free_ret)
{
char str[2] = { 0, 0 };
str[0] = *settings_get_str("cmdchar");
*free_ret = TRUE;
return g_strdup(str);
}
/* modes of current channel, if any */ /* modes of current channel, if any */
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret) static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
{ {
@ -585,6 +596,8 @@ void expandos_init(void)
"", EXPANDO_NEVER, NULL); "", EXPANDO_NEVER, NULL);
expando_create("K", expando_cmdchars, expando_create("K", expando_cmdchars,
"setup changed", EXPANDO_ARG_NONE, NULL); "setup changed", EXPANDO_ARG_NONE, NULL);
expando_create("k", expando_cmdchar,
"setup changed", EXPANDO_ARG_NONE, NULL);
expando_create("M", expando_chanmode, expando_create("M", expando_chanmode,
"window changed", EXPANDO_ARG_NONE, "window changed", EXPANDO_ARG_NONE,
"window item changed", EXPANDO_ARG_WINDOW, "window item changed", EXPANDO_ARG_WINDOW,