1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 18:54:47 +02:00

Allow clearing other list modes using ClearBans.

This commit is contained in:
Sadie Powell
2025-04-15 14:44:41 +01:00
parent d891f2bcbd
commit 5c2fc1cedd
5 changed files with 42 additions and 25 deletions
+7 -3
View File
@@ -59,7 +59,7 @@ public:
CanSQLineChannel = true;
CanSZLine = true;
CanSVSHold = true;
CanClearBans = true;
CanClearModes.insert("BAN");
CanCertFP = true;
CanTagMessage = true;
RequiresID = true;
@@ -456,9 +456,13 @@ private:
return true;
}
void SendClearBans(const MessageSource &user, Channel *c, User* u) override
void SendClearModes(const MessageSource &user, Channel *c, User* u, const Anope::string &mode) override
{
Uplink::Send(user, "SVS2MODE", c->name, "-b", u->GetUID());
auto *cm = ModeManager::FindChannelModeByName(mode);
if (!cm || !cm->mchar)
return;
Uplink::Send(user, "SVS2MODE", c->name, Anope::printf("-%c", cm->mchar), u->GetUID());
}
bool IsTagValid(const Anope::string &tname, const Anope::string &tvalue) override