diff options
author | Timo Sirainen <cras@irssi.org> | 2002-03-14 11:36:31 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-03-14 11:36:31 +0000 |
commit | 2ab05e7872ab402e8e23d4a8ac75d954314c57bb (patch) | |
tree | 4d4f97cd1e2bd03800ee5d494747a0ecdbad6db3 | |
parent | 7d58cc000f66551a72e0546b65e0ef2fb8167b72 (diff) | |
download | irssi-2ab05e7872ab402e8e23d4a8ac75d954314c57bb.zip |
$cumode and $cumode_space should do stuff only to IRC servers.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2611 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/irc/core/irc-expandos.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index 7fb49417..b877195b 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -1,7 +1,7 @@ /* irc-expandos.c : irssi - Copyright (C) 2000 Timo Sirainen + Copyright (C) 2000-2002 Timo Sirainen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -24,7 +24,7 @@ #include "settings.h" #include "irc-servers.h" -#include "channels.h" +#include "irc-channels.h" #include "nicklist.h" static char *last_join; @@ -85,7 +85,7 @@ static char *expando_usermode(SERVER_REC *server, void *item, int *free_ret) /* expands to your usermode on channel, op '@', halfop '%', "+" voice */ static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret) { - if (IS_CHANNEL(item) && CHANNEL(item)->ownnick) { + if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) { return NICK(CHANNEL(item)->ownnick)->op ? "@" : NICK(CHANNEL(item)->ownnick)->halfop ? "%" : NICK(CHANNEL(item)->ownnick)->voice ? "+" : ""; @@ -98,7 +98,10 @@ static char *expando_cumode(SERVER_REC *server, void *item, int *free_ret) static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret) { char *ret; - + + if (!IS_IRC_SERVER(server)) + return ""; + ret = expando_cumode(server, item, free_ret); return *ret == '\0' ? " " : ret; } |