diff options
author | Timo Sirainen <cras@irssi.org> | 2000-08-10 19:39:06 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-08-10 19:39:06 +0000 |
commit | a25a912ec85792e92123be19be0d47098b0dc8b6 (patch) | |
tree | ed80783721a1765fea410f93cc75ec5ac232e172 | |
parent | a900cb580fd0ac1b617dfa4357b5c4cd7b126bc1 (diff) | |
download | irssi-a25a912ec85792e92123be19be0d47098b0dc8b6.zip |
/channel add -bots: You can now use @ or + before the nick mask to
indicate that bot should have either ops or voices/ops.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@578 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/irc/core/channels-setup.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/irc/core/channels-setup.c b/src/irc/core/channels-setup.c index 4f3cf17b..1252854a 100644 --- a/src/irc/core/channels-setup.c +++ b/src/irc/core/channels-setup.c @@ -21,6 +21,7 @@ #include "module.h" #include "signals.h" +#include "irc.h" #include "channels.h" #include "channels-setup.h" #include "nicklist.h" @@ -164,9 +165,15 @@ static void channel_wholist(CHANNEL_REC *channel) /* find first available bot.. */ bots = g_strsplit(rec->botmasks, " ", -1); for (bot = bots; *bot != NULL; bot++) { - nick = nicklist_find(channel, *bot); + const char *botnick = *bot; + + nick = nicklist_find(channel, isnickflag(*botnick) ? + botnick+1 : botnick); if (nick == NULL) continue; + if ((*botnick == '@' && !nick->op) || + (*botnick == '+' && !nick->voice && !nick->op)) + continue; /* got one! */ eval_special_string(rec->autosendcmd, nick->nick, channel->server, channel); |