diff options
author | Adam <Adam@anope.org> | 2012-11-22 00:50:33 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-22 00:50:33 -0500 |
commit | d33a0f75a5c0c584fbb7cc0076da36d494f39494 (patch) | |
tree | 7b2274cc833c793c0f5595660cbd4d715de52ffd /modules/pseudoclients/global.cpp | |
parent | 368d469631763e9c8bf399980d0ac7c5b5664d39 (diff) |
Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each
other
Diffstat (limited to 'modules/pseudoclients/global.cpp')
-rw-r--r-- | modules/pseudoclients/global.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index 13e7570ce..a5e1eb573 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -53,8 +53,8 @@ class GlobalCore : public Module { this->SetAuthor("Anope"); - const BotInfo *Global = findbot(Config->Global); - if (Global == NULL) + Global = BotInfo::Find(Config->Global); + if (!Global) throw ModuleException("No bot named " + Config->Global); Implementation i[] = { I_OnRestart, I_OnShutdown, I_OnNewServer, I_OnPreHelp }; @@ -64,19 +64,19 @@ class GlobalCore : public Module void OnRestart() anope_override { if (Config->GlobalOnCycle) - global->SendGlobal(findbot(Config->Global), "", Config->GlobalOnCycleMessage); + GlobalService->SendGlobal(Global, "", Config->GlobalOnCycleMessage); } void OnShutdown() anope_override { if (Config->GlobalOnCycle) - global->SendGlobal(findbot(Config->Global), "", Config->GlobalOnCycleMessage); + GlobalService->SendGlobal(Global, "", Config->GlobalOnCycleMessage); } void OnNewServer(Server *s) anope_override { if (Config->GlobalOnCycle && !Config->GlobalOnCycleUP.empty()) - s->Notice(findbot(Config->Global), Config->GlobalOnCycleUP); + s->Notice(Global, Config->GlobalOnCycleUP); } EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override |