diff options
| author | 2012-05-27 06:10:41 -0700 | |
|---|---|---|
| committer | 2012-05-27 06:10:41 -0700 | |
| commit | 9383bf66fa02e37a4cea904fe9be4fe4f5eb7fa0 (patch) | |
| tree | a510b6a8ada2a2fa975ee32ee1ebb38aa8319856 /src | |
| parent | Merge pull request #129 from attilamolnar/insp12+modestringfix (diff) | |
| parent | m_opermodes Get rid of the duplicated s2s message caused by SendGlobalMode (diff) | |
Merge pull request #130 from attilamolnar/insp12+modfixes
Minor improvements and fixes to several modules
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/m_alltime.cpp | 6 | ||||
| -rw-r--r-- | src/modules/m_callerid.cpp | 5 | ||||
| -rw-r--r-- | src/modules/m_cban.cpp | 4 | ||||
| -rw-r--r-- | src/modules/m_opermodes.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_svshold.cpp | 4 |
5 files changed, 11 insertions, 10 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index fe2818d62..a93ec77cf 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -39,15 +39,15 @@ class CommandAlltime : public Command time_t now = ServerInstance->Time(); strftime(fmtdate, sizeof(fmtdate), "%Y-%m-%d %H:%M:%S", gmtime(&now)); - std::string msg = ":" + std::string(ServerInstance->Config->ServerName) + " NOTICE " + user->nick + " :System time is " + fmtdate + "(" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; + std::string msg = "System time is " + std::string(fmtdate) + " (" + ConvToStr(ServerInstance->Time()) + ") on " + ServerInstance->Config->ServerName; if (IS_LOCAL(user)) { - user->Write(msg); + user->WriteServ("NOTICE %s :%s", user->nick.c_str(), msg.c_str()); } else { - ServerInstance->PI->PushToClient(user, ":" + msg); + ServerInstance->PI->SendUserNotice(user, msg); } /* we want this routed out! */ diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index f53766152..06f09cdae 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -372,8 +372,9 @@ public: throw ModuleException("Could not add command!"); } - Implementation eventlist[] = { I_OnRehash, I_OnUserPreNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage, I_OnCleanup }; - ServerInstance->Modules->Attach(eventlist, this, 7); + Implementation eventlist[] = { I_OnRehash, I_OnUserPreNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage, I_OnCleanup, + I_OnSyncUserMetaData, I_OnDecodeMetaData }; + ServerInstance->Modules->Attach(eventlist, this, 9); } virtual ~ModuleCallerID() diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 6d91f2a5d..350cec914 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -176,8 +176,8 @@ class ModuleCBan : public Module mycommand = new CommandCBan(Me); ServerInstance->AddCommand(mycommand); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, 4); + Implementation eventlist[] = { I_OnUserPreJoin, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleCBan() diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 478af0fe1..3f2d057ad 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -116,7 +116,7 @@ class ModuleModesOnOper : public Module modes.push_back(tokens[k]); } - ServerInstance->SendGlobalMode(modes, u); + ServerInstance->Modes->Process(modes, u, true); } }; diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index af625ec90..da843469b 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -162,8 +162,8 @@ class ModuleSVSHold : public Module ServerInstance->XLines->RegisterFactory(s); mycommand = new CommandSvshold(Me); ServerInstance->AddCommand(mycommand); - Implementation eventlist[] = { I_OnUserPreNick, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, 4); + Implementation eventlist[] = { I_OnUserPreNick, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 2); } |
