diff --git a/include/znc/Message.h b/include/znc/Message.h index b9bde632..02305859 100644 --- a/include/znc/Message.h +++ b/include/znc/Message.h @@ -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); diff --git a/modules/adminlog.cpp b/modules/adminlog.cpp index 19c79586..bd172813 100644 --- a/modules/adminlog.cpp +++ b/modules/adminlog.cpp @@ -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; diff --git a/modules/route_replies.cpp b/modules/route_replies.cpp index 1bf22dca..790e4850 100644 --- a/modules/route_replies.cpp +++ b/modules/route_replies.cpp @@ -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); diff --git a/modules/schat.cpp b/modules/schat.cpp index daf26c59..713023aa 100644 --- a/modules/schat.cpp +++ b/modules/schat.cpp @@ -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"); diff --git a/src/Client.cpp b/src/Client.cpp index ac210f3b..82164986 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -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>")); diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp index 2518d36f..e9db5447 100644 --- a/src/IRCSock.cpp +++ b/src/IRCSock.cpp @@ -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 diff --git a/src/Message.cpp b/src/Message.cpp index 1beed063..6242e428 100644 --- a/src/Message.cpp +++ b/src/Message.cpp @@ -151,7 +151,7 @@ CString CMessage::ToString(unsigned int uFlags) const { if (!sMessage.empty()) { sMessage += " "; } - sMessage += GetParams(0); + sMessage += GetParamsColon(0); } return sMessage;