mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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:
parent
a900cb580f
commit
a25a912ec8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user