summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/global.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pseudoclients/global.cpp')
-rw-r--r--modules/pseudoclients/global.cpp10
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> &params) anope_override