From 35c8cde85996e9fe89920acb92a84c5d9bd6aeaf Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 22 Apr 2018 21:58:15 +0100 Subject: [PATCH] Fix some oversights relating to numerics. - ERR_CANNOTSENDTOCHAN only takes the channel name and a message. - ERR_INVALIDCAPCMD is 410 not 232. --- src/modules/m_cap.cpp | 2 +- src/modules/m_censor.cpp | 2 +- src/modules/m_chanfilter.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index 603c7e235..1465f8a38 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -24,7 +24,7 @@ enum { // From IRCv3 capability-negotiation-3.1. - ERR_INVALIDCAPCMD = 232 + ERR_INVALIDCAPCMD = 410 }; namespace Cap diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 9044c90b1..fedc0f713 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -71,7 +71,7 @@ class ModuleCensor : public Module if (index->second.empty()) { const std::string targname = target.type == MessageTarget::TYPE_CHANNEL ? target.Get()->name : target.Get()->nick; - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, targname, index->first.c_str(), "Your message contained a censored word, and was blocked"); + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, targname, "Your message contained a censored word (" + index->first + "), and was blocked"); return MOD_RES_DENY; } diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 55b6d3d2f..ce6a31a34 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -123,7 +123,7 @@ class ModuleChanFilter : public Module if (hidemask) user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (your message contained a censored word)"); else - user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, i->mask, "Cannot send to channel (your message contained a censored word)"); + user->WriteNumeric(ERR_CANNOTSENDTOCHAN, chan->name, "Cannot send to channel (your message contained a censored word: " + i->mask + ")"); return MOD_RES_DENY; } } -- 2.39.5