summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-10-09 19:53:37 +0100
committerPeter Powell <petpow@saberuk.com>2018-10-09 20:09:05 +0100
commit3f0a66ce0636726c5b16c291f59e59f6ae7edaf7 (patch)
tree5ab0ee7d9319197958214a251e1dd89dca27237f
parent548def58600a5841792504bfdb117c1077482a0d (diff)
Fix sending malformed ERR_BANLISTFULL numerics in some contexts.
Fixes ircdocs/irc-defs#37.
-rw-r--r--src/modes/cmode_b.cpp3
-rw-r--r--src/modules/m_banredirect.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp
index e45f191f7..5383f40da 100644
--- a/src/modes/cmode_b.cpp
+++ b/src/modes/cmode_b.cpp
@@ -118,7 +118,8 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan
long maxbans = chan->GetMaxBans();
if (IS_LOCAL(user) && ((unsigned)chan->bans.size() >= (unsigned)maxbans))
{
- user->WriteServ("478 %s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)",user->nick.c_str(), chan->name.c_str(), chan->name.c_str(), maxbans);
+ user->WriteServ("478 %s %s %c :Channel ban list for %s is full (maximum entries for this channel is %ld)",
+ user->nick.c_str(), chan->name.c_str(), mode, chan->name.c_str(), maxbans);
dest.clear();
return dest;
}
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 1d35c2934..3df8b5e66 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -80,7 +80,8 @@ class BanRedirect : public ModeWatcher
if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
{
- source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans);
+ source->WriteNumeric(478, "%s %s %c :Channel ban list for %s is full (maximum entries for this channel is %ld)",
+ source->nick.c_str(), channel->name.c_str(), mode, channel->name.c_str(), maxbans);
return false;
}