diff options
author | Timo Sirainen <cras@irssi.org> | 2003-10-31 15:05:52 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2003-10-31 15:05:52 +0000 |
commit | d4d2e91f81487821bd243262507a54f8a8b45fec (patch) | |
tree | e103d1ab6f1d7bf18a3162c8c6e893b738b05a97 /src/core/expandos.c | |
parent | 8cd7dd313f5922fa3137703bbc774fce9e1c1947 (diff) | |
download | irssi-d4d2e91f81487821bd243262507a54f8a8b45fec.zip |
Added /set chanmode_verbose. patch by c0ffee.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3137 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/expandos.c')
-rw-r--r-- | src/core/expandos.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/core/expandos.c b/src/core/expandos.c index 7ebc4f20..e259c50f 100644 --- a/src/core/expandos.c +++ b/src/core/expandos.c @@ -333,8 +333,23 @@ static char *expando_cmdchar(SERVER_REC *server, void *item, int *free_ret) /* modes of current channel, if any */ static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret) -{ - return !IS_CHANNEL(item) ? NULL : CHANNEL(item)->mode; +{ + char *cmode; + + *free_ret = FALSE; + + if (!IS_CHANNEL(item)) + return NULL; + + if (settings_get_bool("chanmode_verbose")) + return CHANNEL(item)->mode; + + *free_ret = TRUE; + cmode = g_strdup(CHANNEL(item)->mode); + if (strchr(cmode, ' ') != NULL) + *(strchr(cmode, ' ')) = 0; + + return cmode; } /* current nickname */ @@ -559,6 +574,7 @@ void expandos_init(void) #endif settings_add_str("misc", "STATUS_OPER", "*"); settings_add_str("lookandfeel", "timestamp_format", "%H:%M"); + settings_add_bool("lookandfeel", "chanmode_verbose", TRUE); client_start_time = time(NULL); last_sent_msg = NULL; last_sent_msg_body = NULL; |