From b72984f479fd4a2a3d2a1c62b0ef21f54af5abbf Mon Sep 17 00:00:00 2001 From: Robby- Date: Thu, 3 Jan 2013 19:32:31 +0100 Subject: [PATCH] cmode_b: Correction to the maxbans conditional It was possible to set one more ban beyond the configured limit. --- src/modes/cmode_b.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 11376492d..d2f8b6253 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -115,7 +115,7 @@ std::string& ModeChannelBan::AddBan(User *user, std::string &dest, Channel *chan return dest; long maxbans = chan->GetMaxBans(); - if (IS_LOCAL(user) && ((unsigned)chan->bans.size() > (unsigned)maxbans)) + 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); dest = "";