diff options
author | Adam <Adam@anope.org> | 2013-01-06 16:13:35 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-01-06 16:13:35 -0500 |
commit | ed719c80e75f36475626233207a530de2659a063 (patch) | |
tree | 303c53ce36324b286e10a3e76d98a5e22a13fe1c /modules/commands/gl_global.cpp | |
parent | 77dc2e474669d8f0bee3cc047a10ddcfc4faf700 (diff) |
Buggy compilers are buggy
Diffstat (limited to 'modules/commands/gl_global.cpp')
-rw-r--r-- | modules/commands/gl_global.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/commands/gl_global.cpp b/modules/commands/gl_global.cpp index 2be0164e3..5fb2c9b35 100644 --- a/modules/commands/gl_global.cpp +++ b/modules/commands/gl_global.cpp @@ -16,8 +16,10 @@ class CommandGLGlobal : public Command { + ServiceReference<GlobalService> GService; + public: - CommandGLGlobal(Module *creator) : Command(creator, "global/global", 1, 1) + CommandGLGlobal(Module *creator) : Command(creator, "global/global", 1, 1), GService("GlobalService", "Global") { this->SetDesc(_("Send a message to all users")); this->SetSyntax(_("\037message\037")); @@ -27,12 +29,12 @@ class CommandGLGlobal : public Command { const Anope::string &msg = params[0]; - if (!GlobalService) + if (!GService) source.Reply("No global reference, is gl_main loaded?"); else { Log(LOG_ADMIN, source, this); - GlobalService->SendGlobal(Global, source.GetNick(), msg); + GService->SendGlobal(Global, source.GetNick(), msg); } } |