mirror of
https://github.com/znc/znc.git
synced 2026-08-07 01:13:25 +02:00
Replace the deprecated overload of CMessage::GetParam
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
@@ -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");
|
||||
|
||||
+5
-5
@@ -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>"));
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -151,7 +151,7 @@ CString CMessage::ToString(unsigned int uFlags) const {
|
||||
if (!sMessage.empty()) {
|
||||
sMessage += " ";
|
||||
}
|
||||
sMessage += GetParams(0);
|
||||
sMessage += GetParamsColon(0);
|
||||
}
|
||||
|
||||
return sMessage;
|
||||
|
||||
Reference in New Issue
Block a user