]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix sending malformed ERR_BANLISTFULL numerics in some contexts.
authorPeter Powell <petpow@saberuk.com>
Tue, 9 Oct 2018 18:53:37 +0000 (19:53 +0100)
committerPeter Powell <petpow@saberuk.com>
Tue, 9 Oct 2018 19:09:05 +0000 (20:09 +0100)
Fixes ircdocs/irc-defs#37.

src/modes/cmode_b.cpp
src/modules/m_banredirect.cpp

index e45f191f78d330a1ce280b9ec93f6827dc6611c3..5383f40dafaf0c3828bdc2c1b8113d3022beeb5c 100644 (file)
@@ -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;
        }
index 1d35c293454dbb9bbebbbac32541e7415e8bb68e..3df8b5e6627d30d040b48d00c310c06a770cb789 100644 (file)
@@ -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;
                        }