1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 18:23:14 +02:00

Move akick from the core to cs_akick.

This commit is contained in:
Sadie Powell
2025-11-24 12:36:22 +00:00
parent cadeac2dea
commit 62ca6c96eb
13 changed files with 397 additions and 289 deletions
+16 -12
View File
@@ -13,6 +13,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include "module.h"
#include "modules/chanserv/akick.h"
class CommandCSStatus final
: public Command
@@ -82,20 +83,23 @@ public:
}
}
for (unsigned j = 0, end = ci->GetAkickCount(); j < end; ++j)
if (ChanServ::akick_service)
{
AutoKick *autokick = ci->GetAkick(j);
for (unsigned j = 0, end = ChanServ::akick_service->GetAKickCount(ci); j < end; ++j)
{
const auto *autokick = ChanServ::akick_service->GetAKick(ci, j);
if (autokick->nc)
{
if (na && *autokick->nc == na->nc)
source.Reply(_("\002%s\002 is on the auto kick list of \002%s\002 (%s)."), na->nc->display.c_str(), ci->name.c_str(), autokick->reason.c_str());
}
else if (u != NULL)
{
Entry akick_mask("", autokick->mask);
if (akick_mask.Matches(u))
source.Reply(_("\002%s\002 matches auto kick entry %s on \002%s\002 (%s)."), u->nick.c_str(), autokick->mask.c_str(), ci->name.c_str(), autokick->reason.c_str());
if (autokick->nc)
{
if (na && *autokick->nc == na->nc)
source.Reply(_("\002%s\002 is on the auto kick list of \002%s\002 (%s)."), na->nc->display.c_str(), ci->name.c_str(), autokick->reason.c_str());
}
else if (u != NULL)
{
Entry akick_mask("", autokick->mask);
if (akick_mask.Matches(u))
source.Reply(_("\002%s\002 matches auto kick entry %s on \002%s\002 (%s)."), u->nick.c_str(), autokick->mask.c_str(), ci->name.c_str(), autokick->reason.c_str());
}
}
}
}