]> jfr.im git - irc/znc/znc.git/commitdiff
Replace the deprecated overload of CMessage::GetParam
authorAlexey Sokolov <redacted>
Fri, 1 Jun 2018 20:52:56 +0000 (21:52 +0100)
committerAlexey Sokolov <redacted>
Fri, 1 Jun 2018 21:22:44 +0000 (22:22 +0100)
include/znc/Message.h
modules/adminlog.cpp
modules/route_replies.cpp
modules/schat.cpp
src/Client.cpp
src/IRCSock.cpp
src/Message.cpp

index b9bde632b828935025a13c41cbf51bbe7ba1299e..02305859101fcd966f184871b51643d29140452e 100644 (file)
@@ -259,7 +259,7 @@ REGISTER_ZNC_MESSAGE(CJoinMessage);
 
 class CModeMessage : public CTargetMessage {
   public:
-    CString GetModes() const { return GetParams(1).TrimPrefix_n(":"); }
+    CString GetModes() const { return GetParamsColon(1).TrimPrefix_n(":"); }
 };
 REGISTER_ZNC_MESSAGE(CModeMessage);
 
index 19c79586efffff3c56c70e0ecf41154c5176673d..bd172813fe5fcbd7cfff371eca38319b5bf7f6cd 100644 (file)
@@ -76,7 +76,7 @@ class CAdminLogMod : public CModule {
             Log("[" + GetUser()->GetUserName() + "/" + GetNetwork()->GetName() +
                     "] disconnected from IRC: " +
                     GetNetwork()->GetCurrentServer()->GetName() + " [" +
-                    Message.GetParams(1) + "]",
+                    Message.GetParamsColon(1) + "]",
                 LOG_NOTICE);
         }
         return CONTINUE;
index 1bf22dcaa4c174cbd67c4fe7a44f10608d9c04f8..790e4850f934f6513fa5b74b423f32384167a138 100644 (file)
@@ -302,7 +302,7 @@ class CRouteRepliesMod : public CModule {
 
             // If there are arguments to a mode change,
             // we must not route it.
-            if (!Message.GetParams(2).empty()) return CONTINUE;
+            if (!Message.GetParamsColon(2).empty()) return CONTINUE;
 
             // Grab the mode change parameter
             CString sMode = Message.GetParam(1);
index daf26c59b891f3797bde4d488742d3607b83862b..713023aa1905c331354f74e74c70acd819a4eb66 100644 (file)
@@ -144,7 +144,7 @@ class CSChat : public CModule {
     EModRet OnUserRawMessage(CMessage& msg) override {
         if (!msg.GetCommand().Equals("schat")) return CONTINUE;
 
-        const CString sParams = msg.GetParams(0);
+        const CString sParams = msg.GetParamsColon(0);
         if (sParams.empty()) {
             PutModule("SChat User Area ...");
             OnModCommand("help");
index ac210f3beec7d06d6c1b15fbe2bbef709d9ede92..8216498652aa4a1e9a15ba6a8f006b663ee52cae 100644 (file)
@@ -1204,7 +1204,7 @@ bool CClient::OnPingMessage(CMessage& Message) {
     // All PONGs are generated by ZNC. We will still forward this to
     // the ircd, but all PONGs from irc will be blocked.
     if (!Message.GetParams().empty())
-        PutClient(":irc.znc.in PONG irc.znc.in " + Message.GetParams(0));
+        PutClient(":irc.znc.in PONG irc.znc.in " + Message.GetParamsColon(0));
     else
         PutClient(":irc.znc.in PONG irc.znc.in");
     return false;
@@ -1305,10 +1305,10 @@ bool CClient::OnOtherMessage(CMessage& Message) {
         CString sModCommand;
 
         if (sTarget.TrimPrefix(m_pUser->GetStatusPrefix())) {
-            sModCommand = Message.GetParams(1);
+            sModCommand = Message.GetParamsColon(1);
         } else {
             sTarget = "status";
-            sModCommand = Message.GetParams(0);
+            sModCommand = Message.GetParamsColon(0);
         }
 
         if (sTarget.Equals("status")) {
@@ -1330,7 +1330,7 @@ bool CClient::OnOtherMessage(CMessage& Message) {
             return true;
         }
 
-        CString sPatterns = Message.GetParams(0);
+        CString sPatterns = Message.GetParamsColon(0);
 
         if (sPatterns.empty()) {
             PutStatusNotice(t_s("Usage: /attach <#chans>"));
@@ -1352,7 +1352,7 @@ bool CClient::OnOtherMessage(CMessage& Message) {
             return true;
         }
 
-        CString sPatterns = Message.GetParams(0);
+        CString sPatterns = Message.GetParamsColon(0);
 
         if (sPatterns.empty()) {
             PutStatusNotice(t_s("Usage: /detach <#chans>"));
index 2518d36f31c413147a18cd739f8f2de5c6acc060..e9db5447c5a327b65532a4327ab9afadfaa85741 100644 (file)
@@ -761,7 +761,7 @@ bool CIRCSock::OnNumericMessage(CNumericMessage& Message) {
             CChan* pChan = m_pNetwork->FindChan(Message.GetParam(1));
 
             if (pChan) {
-                pChan->SetModes(Message.GetParams(2));
+                pChan->SetModes(Message.GetParamsColon(2));
 
                 // We don't SetModeKnown(true) here,
                 // because a 329 will follow
index 1beed0636e55546dba9692c393e2aa43a63f7871..6242e42852bd1dafcbb867ec11b767e68befe5d2 100644 (file)
@@ -151,7 +151,7 @@ CString CMessage::ToString(unsigned int uFlags) const {
         if (!sMessage.empty()) {
             sMessage += " ";
         }
-        sMessage += GetParams(0);
+        sMessage += GetParamsColon(0);
     }
 
     return sMessage;