diff options
author | Sadie Powell <sadie@witchery.services> | 2024-05-10 19:03:50 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-05-10 19:03:50 +0100 |
commit | ff1c5adb8bfbdd76e5c44860649fa0f7f0101982 (patch) | |
tree | 86238157091e46a1c49270b70a8004f198a2a9e6 /modules/protocol/solanum.cpp | |
parent | c36030c82617ee2616260c9ca3635940e5a7a679 (diff) |
Always use server-side topic and mode locks where available.
Diffstat (limited to 'modules/protocol/solanum.cpp')
-rw-r--r-- | modules/protocol/solanum.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/protocol/solanum.cpp b/modules/protocol/solanum.cpp index fccf85230..24c3c54b6 100644 --- a/modules/protocol/solanum.cpp +++ b/modules/protocol/solanum.cpp @@ -354,8 +354,6 @@ class ProtoSolanum final IRCDMessagePrivmsg message_privmsg; IRCDMessageServer message_server; - bool use_server_side_mlock; - static void AddModes() { /* Add user modes */ @@ -444,18 +442,13 @@ public: OnUserLogin(u); } - void OnReload(Configuration::Conf *conf) override - { - use_server_side_mlock = conf->GetModule(this)->Get<bool>("use_server_side_mlock"); - } - void OnChannelSync(Channel *c) override { if (!c->ci) return; ModeLocks *modelocks = c->ci->GetExt<ModeLocks>("modelocks"); - if (use_server_side_mlock && modelocks && Servers::Capab.count("MLOCK") > 0) + if (modelocks && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", ""); Uplink::Send("MLOCK", c->creation_time, c->ci->name, modes); @@ -466,7 +459,7 @@ public: { ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks"); ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name); - if (use_server_side_mlock && cm && ci->c && modelocks && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) + if (cm && ci->c && modelocks && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "") + cm->mchar; Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); @@ -479,7 +472,7 @@ public: { ModeLocks *modelocks = ci->GetExt<ModeLocks>("modelocks"); ChannelMode *cm = ModeManager::FindChannelModeByName(lock->name); - if (use_server_side_mlock && cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) + if (cm && modelocks && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0) { Anope::string modes = modelocks->GetMLockAsString(false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, ""); Uplink::Send("MLOCK", ci->c->creation_time, ci->name, modes); |