diff options
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 21817f283..12c6b2b92 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -464,6 +464,14 @@ char* add_ban(userrec *user,char *dest,chanrec *chan,int status) c++; if (c>1) return NULL; + + long maxbans = GetMaxBans(chan->name); + if (chan->bans.size() > maxbans) + { + WriteServ(user->fd,"478 %s %s :Channel ban list for %s is full (maximum entries for this channel is %d)",user->nick, chan->name,chan->name,maxbans); + return NULL; + } + log(DEBUG,"add_ban: %s %s",chan->name,user->nick); TidyBan(dest); |