summaryrefslogtreecommitdiff
path: root/src/irc/core/channels-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/channels-setup.c')
-rw-r--r--src/irc/core/channels-setup.c9
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);