1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 23:46:39 +02:00

Fixed botserv kicker logic

This commit is contained in:
Adam
2011-04-16 04:35:14 -04:00
parent efe5fedde9
commit 2cd511d3a3
+6 -6
View File
@@ -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)