diff options
author | Timo Sirainen <cras@irssi.org> | 2001-09-20 15:58:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-09-20 15:58:14 +0000 |
commit | 7814192f037b38245f3b48d122aff809e91bdd30 (patch) | |
tree | a4d1cbf03ee1396e1e7a7cf9fb65b7c65a4315ef /src/core/special-vars.c | |
parent | 8104317897bdad87a5e57638088f7f893bcead57 (diff) | |
download | irssi-7814192f037b38245f3b48d122aff809e91bdd30.zip |
special vars: added PARSE_FLAG_ONLY_PARAMS. Theme loading now uses it so
you can use $C etc. in themes to print the active channel. printformat()
also expands it now correctly to the server/target where the message was
printed, not to the active window's server/target.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1802 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/special-vars.c')
-rw-r--r-- | src/core/special-vars.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/special-vars.c b/src/core/special-vars.c index 45bad34d..c1523319 100644 --- a/src/core/special-vars.c +++ b/src/core/special-vars.c @@ -202,6 +202,11 @@ static char *get_special_value(char **cmd, SERVER_REC *server, void *item, char command, *value, *p; int len; + if ((flags & PARSE_FLAG_ONLY_PARAMS) && !isdigit(**cmd)) { + *free_ret = TRUE; + return g_strdup_printf("$%c", **cmd); + } + if (**cmd == '!') { /* find text from command history */ if (flags & PARSE_FLAG_GETNAME) |