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 | |
| parent | 77dc2e474669d8f0bee3cc047a10ddcfc4faf700 (diff) | |
Buggy compilers are buggy
Diffstat (limited to 'modules/commands')
| -rw-r--r-- | modules/commands/cs_log.cpp | 8 | ||||
| -rw-r--r-- | modules/commands/gl_global.cpp | 8 | ||||
| -rw-r--r-- | modules/commands/hs_request.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_cancel.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_ignore.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_read.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_rsend.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_send.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_sendall.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ms_staff.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/ns_logout.cpp | 2 | ||||
| -rw-r--r-- | modules/commands/os_defcon.cpp | 36 |
12 files changed, 32 insertions, 38 deletions
diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 4965ab561..18270a1a2 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -181,10 +181,12 @@ public: class CSLog : public Module { + ServiceReference<MemoServService> MSService; CommandCSLog commandcslog; public: - CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcslog(this) + CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSService("MemoServService", "MemoServ"), commandcslog(this) { this->SetAuthor("Anope"); @@ -212,8 +214,8 @@ class CSLog : public Module } else if (log->method.equals_ci("NOTICE") && l->ci->c && l->ci->bi && l->ci->c->FindUser(l->ci->bi) != NULL) IRCD->SendNotice(l->ci->bi, log->extra + l->ci->c->name, "%s", buffer.c_str()); - else if (log->method.equals_ci("MEMO") && MemoServService && l->ci->WhoSends() != NULL) - MemoServService->Send(l->ci->WhoSends()->nick, l->ci->name, buffer, true); + else if (log->method.equals_ci("MEMO") && MSService && l->ci->WhoSends() != NULL) + MSService->Send(l->ci->WhoSends()->nick, l->ci->name, buffer, true); } } } 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); } } diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index 6cd2e6811..a5dcfc4cc 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -18,6 +18,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + static bool HSRequestMemoUser = false; static bool HSRequestMemoOper = false; diff --git a/modules/commands/ms_cancel.cpp b/modules/commands/ms_cancel.cpp index 8949baf17..68a2289b7 100644 --- a/modules/commands/ms_cancel.cpp +++ b/modules/commands/ms_cancel.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSCancel : public Command { public: diff --git a/modules/commands/ms_ignore.cpp b/modules/commands/ms_ignore.cpp index 465714852..ceb4f40d0 100644 --- a/modules/commands/ms_ignore.cpp +++ b/modules/commands/ms_ignore.cpp @@ -15,6 +15,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSIgnore : public Command { public: diff --git a/modules/commands/ms_read.cpp b/modules/commands/ms_read.cpp index 6d5adfb05..5e080f88c 100644 --- a/modules/commands/ms_read.cpp +++ b/modules/commands/ms_read.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + static void rsend_notify(CommandSource &source, MemoInfo *mi, Memo *m, const Anope::string &targ) { /* Only send receipt if memos are allowed */ diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index b08b9be85..3787e9428 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSRSend : public Command { public: diff --git a/modules/commands/ms_send.cpp b/modules/commands/ms_send.cpp index 42024227e..816d0336c 100644 --- a/modules/commands/ms_send.cpp +++ b/modules/commands/ms_send.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSSend : public Command { public: diff --git a/modules/commands/ms_sendall.cpp b/modules/commands/ms_sendall.cpp index 5ade6722b..cba0a160e 100644 --- a/modules/commands/ms_sendall.cpp +++ b/modules/commands/ms_sendall.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSSendAll : public Command { public: diff --git a/modules/commands/ms_staff.cpp b/modules/commands/ms_staff.cpp index a1fbdf65d..d19dbf8b6 100644 --- a/modules/commands/ms_staff.cpp +++ b/modules/commands/ms_staff.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "memoserv.h" +static ServiceReference<MemoServService> MemoServService("MemoServService", "MemoServ"); + class CommandMSStaff : public Command { public: diff --git a/modules/commands/ns_logout.cpp b/modules/commands/ns_logout.cpp index 5519e6ae8..133d9fc23 100644 --- a/modules/commands/ns_logout.cpp +++ b/modules/commands/ns_logout.cpp @@ -14,6 +14,8 @@ #include "module.h" #include "nickserv.h" +static ServiceReference<NickServService> NickServService("NickServService", "NickServ"); + class CommandNSLogout : public Command { public: diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 4bcf9de38..6d043b17c 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -98,12 +98,11 @@ struct DefconConfig static DefconConfig DConfig; -/**************************************************************************/ - -void defcon_sendlvls(CommandSource &source); -void runDefCon(); +static void runDefCon(); static Anope::string defconReverseModes(const Anope::string &modes); +static ServiceReference<GlobalService> GlobalService("GlobalService", "Global"); + class DefConTimeout : public CallBack { int level; @@ -556,34 +555,7 @@ class OSDefcon : public Module } }; -/** - * Send a message to the oper about which precautions are "active" for this level - **/ -void defcon_sendlvls(CommandSource &source) -{ - if (DConfig.Check(DEFCON_NO_NEW_CHANNELS)) - source.Reply(_("* No new channel registrations")); - if (DConfig.Check(DEFCON_NO_NEW_NICKS)) - source.Reply(_("* No new nick registrations")); - if (DConfig.Check(DEFCON_NO_MLOCK_CHANGE)) - source.Reply(_("* No MLOCK changes")); - if (DConfig.Check(DEFCON_FORCE_CHAN_MODES) && !DConfig.chanmodes.empty()) - source.Reply(_("* Force Chan Modes (%s) to be set on all channels"), DConfig.chanmodes.c_str()); - if (DConfig.Check(DEFCON_REDUCE_SESSION)) - source.Reply(_("* Use the reduced session limit of %d"), DConfig.sessionlimit); - if (DConfig.Check(DEFCON_NO_NEW_CLIENTS)) - source.Reply(_("* Kill any NEW clients connecting")); - if (DConfig.Check(DEFCON_OPER_ONLY)) - source.Reply(_("* Ignore any non-opers with message")); - if (DConfig.Check(DEFCON_SILENT_OPER_ONLY)) - source.Reply(_("* Silently ignore non-opers")); - if (DConfig.Check(DEFCON_AKILL_NEW_CLIENTS)) - source.Reply(_("* AKILL any new clients connecting")); - if (DConfig.Check(DEFCON_NO_NEW_MEMOS)) - source.Reply(_("* No new memos sent")); -} - -void runDefCon() +static void runDefCon() { if (DConfig.Check(DEFCON_FORCE_CHAN_MODES)) { |
