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);
Log("[" + GetUser()->GetUserName() + "/" + GetNetwork()->GetName() +
"] disconnected from IRC: " +
GetNetwork()->GetCurrentServer()->GetName() + " [" +
- Message.GetParams(1) + "]",
+ Message.GetParamsColon(1) + "]",
LOG_NOTICE);
}
return CONTINUE;
// 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);
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");
// 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;
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")) {
return true;
}
- CString sPatterns = Message.GetParams(0);
+ CString sPatterns = Message.GetParamsColon(0);
if (sPatterns.empty()) {
PutStatusNotice(t_s("Usage: /attach <#chans>"));
return true;
}
- CString sPatterns = Message.GetParams(0);
+ CString sPatterns = Message.GetParamsColon(0);
if (sPatterns.empty()) {
PutStatusNotice(t_s("Usage: /detach <#chans>"));
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
if (!sMessage.empty()) {
sMessage += " ";
}
- sMessage += GetParams(0);
+ sMessage += GetParamsColon(0);
}
return sMessage;