diff options
Diffstat (limited to 'src/irc/core/irc-expandos.c')
-rw-r--r-- | src/irc/core/irc-expandos.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index ccd64324..2825dfc9 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -94,6 +94,16 @@ static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret) return ""; } +/* expands to your usermode on channel, + op '@', halfop '%', "+" voice, " " normal */ +static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret) +{ + char *ret; + + ret = expando_cumode(server, item, free_ret); + return *ret == '\0' ? " " : ret; +} + static void event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *address) { @@ -127,6 +137,10 @@ void irc_expandos_init(void) "window changed", EXPANDO_ARG_NONE, "window item changed", EXPANDO_ARG_WINDOW, "nick mode changed", EXPANDO_ARG_WINDOW_ITEM, NULL); + expando_create("cumode_space", expando_cumode_space, + "window changed", EXPANDO_ARG_NONE, + "window item changed", EXPANDO_ARG_WINDOW, + "nick mode changed", EXPANDO_ARG_WINDOW_ITEM, NULL); expando_add_signal("I", "event invite", EXPANDO_ARG_SERVER); |