summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-16 04:35:14 -0400
committerAdam <Adam@anope.org>2011-04-16 04:35:14 -0400
commit2cd511d3a39df1190d6da40101000824f67b02a4 (patch)
treed634bbb3682fba7ab901370edccb4368a34bcb22
parentefe5fedde900f92663a9e864519334427da4f263 (diff)
Fixed botserv kicker logic
-rw-r--r--src/botserv.cpp12
1 files 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)