ServerInstance->Logs->Log("MODE",DEFAULT,"*** BUG *** AddBan was given an invalid parameter");
if ((!user) || (!chan))
{
ServerInstance->Logs->Log("MODE",DEFAULT,"*** BUG *** AddBan was given an invalid parameter");
- dest = "";
+ dest.clear();
return dest;
}
/* Attempt to tidy the mask */
ModeParser::CleanMask(dest);
/* If the mask was invalid, we exit */
return dest;
}
/* Attempt to tidy the mask */
ModeParser::CleanMask(dest);
/* If the mask was invalid, we exit */
- if (dest == "" || dest.length() > 250)
+ if (dest.empty() || dest.length() > 250)
return dest;
long maxbans = chan->GetMaxBans();
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);
{
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);