From 2cd511d3a39df1190d6da40101000824f67b02a4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 16 Apr 2011 04:35:14 -0400 Subject: [PATCH] Fixed botserv kicker logic --- src/botserv.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/botserv.cpp b/src/botserv.cpp index bb6447b17..119264c1d 100644 --- a/src/botserv.cpp +++ b/src/botserv.cpp @@ -106,20 +106,20 @@ void botchanmsgs(User *u, ChannelInfo *ci, const Anope::string &buf) * way. */ - bool Allow = false; - if (!ci->botflags.HasFlag(BS_DONTKICKOPS) && !ci->botflags.HasFlag(BS_DONTKICKVOICES)) - Allow = true; + bool Allow = true; + if (check_access(u, ci, CA_NOKICK)) + Allow = false; else if (ci->botflags.HasFlag(BS_DONTKICKOPS) && (ci->c->HasUserStatus(u, CMODE_HALFOP) || ci->c->HasUserStatus(u, CMODE_OP) || ci->c->HasUserStatus(u, CMODE_PROTECT) || ci->c->HasUserStatus(u, CMODE_OWNER))) - Allow = true; + Allow = false; else if (ci->botflags.HasFlag(BS_DONTKICKVOICES) && ci->c->HasUserStatus(u, CMODE_VOICE)) - Allow = true; + Allow = false; EventReturn MOD_RESULT; FOREACH_RESULT(I_OnPrivmsg, OnPrivmsg(u, ci, realbuf, Allow)); if (MOD_RESULT == EVENT_STOP) return; - if (!check_access(u, ci, CA_NOKICK) && Allow) + if (Allow) { /* Bolds kicker */ if (ci->botflags.HasFlag(BS_KICK_BOLDS) && realbuf.find(2) != Anope::string::npos)