diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-04 03:04:44 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-04 03:04:44 +0000 |
commit | 9225720d96ceec2cf7c74e1470cd3ad8e250eaa7 (patch) | |
tree | 24520decb70005bc2720605496b785dbe7d52d9b /src/mode.cpp | |
parent | 67cd9cff246d66c5a4b3faa4f55c139560bf6a84 (diff) |
Added new <banlist> tags, allows dynamic banlist sizes on a per channel basis
rather than hard coded or network wide
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@973 e03df62e-2008-0410-955e-edbf42e46eb7
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); |