cmode_b: Correction to the maxbans conditional

It was possible to set one more ban beyond the configured limit.
This commit is contained in:
Robby- 2013-01-03 19:32:31 +01:00
parent ff02867c4f
commit b72984f479

View File

@ -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 = "";