mirror of
https://github.com/anope/anope.git
synced 2026-06-29 13:16:37 +02:00
Fixed botserv kicker logic
This commit is contained in:
+6
-6
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user