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

Rework the module headers to use namespaces and static services.

This commit is contained in:
Sadie Powell
2025-11-24 16:47:00 +00:00
parent 62ca6c96eb
commit be965f2618
65 changed files with 1054 additions and 864 deletions
+5 -5
View File
@@ -597,7 +597,7 @@ public:
if (!c->ci)
return;
ModeLocks *modelocks = c->ci->GetExt<ModeLocks>("modelocks");
auto *modelocks = c->ci->GetExt<ChanServ::ModeLocks>(CHANSERV_MODE_LOCK_EXT);
if (modelocks && Servers::Capab.count("MLOCK") > 0)
{
Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "");
@@ -605,9 +605,9 @@ public:
}
}
EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) override
EventReturn OnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) override
{
ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks");
auto *modelocks = ci->GetExt<ChanServ::ModeLocks>(CHANSERV_MODE_LOCK_EXT);
ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name);
if (cm && ci->c && modelocks && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0)
{
@@ -618,9 +618,9 @@ public:
return EVENT_CONTINUE;
}
EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) override
EventReturn OnUnMLock(ChannelInfo *ci, ChanServ::ModeLock *lock) override
{
ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks");
auto *modelocks = ci->GetExt<ChanServ::ModeLocks>(CHANSERV_MODE_LOCK_EXT);
ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name);
if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0)
{