1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

/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
This commit is contained in:
Timo Sirainen 2000-08-10 19:39:06 +00:00 committed by cras
parent a900cb580f
commit a25a912ec8

View File

@ -21,6 +21,7 @@
#include "module.h" #include "module.h"
#include "signals.h" #include "signals.h"
#include "irc.h"
#include "channels.h" #include "channels.h"
#include "channels-setup.h" #include "channels-setup.h"
#include "nicklist.h" #include "nicklist.h"
@ -164,9 +165,15 @@ static void channel_wholist(CHANNEL_REC *channel)
/* find first available bot.. */ /* find first available bot.. */
bots = g_strsplit(rec->botmasks, " ", -1); bots = g_strsplit(rec->botmasks, " ", -1);
for (bot = bots; *bot != NULL; bot++) { 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) if (nick == NULL)
continue; continue;
if ((*botnick == '@' && !nick->op) ||
(*botnick == '+' && !nick->voice && !nick->op))
continue;
/* got one! */ /* got one! */
eval_special_string(rec->autosendcmd, nick->nick, channel->server, channel); eval_special_string(rec->autosendcmd, nick->nick, channel->server, channel);