diff options
author | Adam <Adam@anope.org> | 2013-05-26 17:13:11 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-26 17:13:11 -0400 |
commit | 22658d63bdb1e52a66f4514af45fa55ca5891345 (patch) | |
tree | 673304ab19f7e077b489354248247867518331f8 /modules/commands/os_defcon.cpp | |
parent | f2dee1e1d642b07947f59f91dfba9af34ef84685 (diff) |
Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Diffstat (limited to 'modules/commands/os_defcon.cpp')
-rw-r--r-- | modules/commands/os_defcon.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 236cf2e2f..ba695649d 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -9,8 +9,6 @@ * Based on the original code of Services by Andy Church. */ -/*************************************************************************/ - #include "module.h" #include "modules/os_session.h" @@ -128,17 +126,17 @@ class DefConTimeout : public Timer { DConfig.defaultlevel = level; FOREACH_MOD(I_OnDefconLevel, OnDefconLevel(level)); - Log(OperServ, "operserv/defcon") << "Defcon level timeout, returning to level " << level; + Log(Config->GetClient("OperServ"), "operserv/defcon") << "Defcon level timeout, returning to level " << level; if (DConfig.globalondefcon) { if (!DConfig.offmessage.empty()) - GlobalService->SendGlobal(Global, "", DConfig.offmessage); + GlobalService->SendGlobal(NULL, "", DConfig.offmessage); else - GlobalService->SendGlobal(Global, "", Anope::printf(Language::Translate(_("The Defcon Level is now at Level: \002%d\002")), DConfig.defaultlevel)); + GlobalService->SendGlobal(NULL, "", Anope::printf(Language::Translate(_("The Defcon Level is now at Level: \002%d\002")), DConfig.defaultlevel)); if (!DConfig.message.empty()) - GlobalService->SendGlobal(Global, "", DConfig.message); + GlobalService->SendGlobal(NULL, "", DConfig.message); } runDefCon(); @@ -221,12 +219,12 @@ class CommandOSDefcon : public Command if (DConfig.globalondefcon) { if (DConfig.defaultlevel == 5 && !DConfig.offmessage.empty()) - GlobalService->SendGlobal(Global, "", DConfig.offmessage); + GlobalService->SendGlobal(NULL, "", DConfig.offmessage); else if (DConfig.defaultlevel != 5) { - GlobalService->SendGlobal(Global, "", Anope::printf(_("The Defcon level is now at: \002%d\002"), DConfig.defaultlevel)); + GlobalService->SendGlobal(NULL, "", Anope::printf(_("The Defcon level is now at: \002%d\002"), DConfig.defaultlevel)); if (!DConfig.message.empty()) - GlobalService->SendGlobal(Global, "", DConfig.message); + GlobalService->SendGlobal(NULL, "", DConfig.message); } } @@ -417,7 +415,7 @@ class OSDefcon : public Module if (DConfig.Check(DEFCON_FORCE_CHAN_MODES) && cm && DConfig.DefConModesOff.count(mname)) { - c->RemoveMode(OperServ, cm, param); + c->RemoveMode(Config->GetClient("OperServ"), cm, param); return EVENT_STOP; } @@ -434,9 +432,9 @@ class OSDefcon : public Module Anope::string param; if (DConfig.GetDefConParam(mname, param)) - c->SetMode(OperServ, cm, param); + c->SetMode(Config->GetClient("OperServ"), cm, param); else - c->SetMode(OperServ, cm); + c->SetMode(Config->GetClient("OperServ"), cm); return EVENT_STOP; @@ -488,6 +486,7 @@ class OSDefcon : public Module if (exempt || u->Quitting() || !u->server->IsSynced() || u->server->IsULined()) return; + BotInfo *OperServ = Config->GetClient("OperServ"); if (DConfig.Check(DEFCON_AKILL_NEW_CLIENTS) && akills) { Log(OperServ, "operserv/defcon") << "DEFCON: adding akill for *@" << u->host; @@ -548,12 +547,13 @@ class OSDefcon : public Module void OnChannelSync(Channel *c) anope_override { if (DConfig.Check(DEFCON_FORCE_CHAN_MODES)) - c->SetModes(OperServ, false, "%s", DConfig.chanmodes.c_str()); + c->SetModes(Config->GetClient("OperServ"), false, "%s", DConfig.chanmodes.c_str()); } }; static void runDefCon() { + BotInfo *OperServ = Config->GetClient("OperServ"); if (DConfig.Check(DEFCON_FORCE_CHAN_MODES)) { if (!DConfig.chanmodes.empty() && !DefConModesSet) |