diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-10 05:55:15 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-10 05:55:15 +0000 |
commit | f6efe1cad8ee10a6d5eba987bc9654508ff58453 (patch) | |
tree | 515a9e9071188214d918991c0a638e3e1a65e51e /src | |
parent | 2937e72a686847bae3ac974159af9d0b56f0052b (diff) | |
download | irssi-f6efe1cad8ee10a6d5eba987bc9654508ff58453.zip |
added $usermode expando
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@990 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc-expandos.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index fba3a20a..95f3695d 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -75,6 +75,12 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret) return g_strconcat(username, "@", hostname, NULL);; } +/* user mode in active server */ +static char *expando_usermode(SERVER_REC *server, void *item, int *free_ret) +{ + return IS_IRC_SERVER(server) ? IRC_SERVER(server)->usermode : ""; +} + static void event_join(IRC_SERVER_REC *server, const char *data, const char *nick, const char *address) { @@ -100,6 +106,10 @@ void irc_expandos_init(void) expando_create("X", expando_userhost, "window changed", EXPANDO_ARG_NONE, "window server changed", EXPANDO_ARG_WINDOW, NULL); + expando_create("usermode", expando_usermode, + "window changed", EXPANDO_ARG_NONE, + "window server changed", EXPANDO_ARG_WINDOW, + "user mode changed", EXPANDO_ARG_WINDOW, NULL); expando_add_signal("I", "event invite", EXPANDO_ARG_SERVER); @@ -114,6 +124,7 @@ void irc_expandos_deinit(void) expando_destroy("H", expando_server_numeric); expando_destroy("S", expando_servername); expando_destroy("X", expando_userhost); + expando_destroy("usermode", expando_usermode); signal_remove("event join", (SIGNAL_FUNC) event_join); } |