summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-04 03:04:44 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-04 03:04:44 +0000
commit9225720d96ceec2cf7c74e1470cd3ad8e250eaa7 (patch)
tree24520decb70005bc2720605496b785dbe7d52d9b /src/inspircd.cpp
parent67cd9cff246d66c5a4b3faa4f55c139560bf6a84 (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/inspircd.cpp')
-rw-r--r--src/inspircd.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index af5200ef1..d979750b5 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -1081,6 +1081,22 @@ chanrec* FindChan(const char* chan)
}
+long GetMaxBans(char* name)
+{
+ char CM[MAXBUF];
+ for (int count = 0; count < ConfValueEnum("banlist",&config_f); count++)
+ {
+ ConfValue("banlist","chan",count,CM,&config_f);
+ if (match(name,CM))
+ {
+ ConfValue("banlist","limit",count,CM,&config_f);
+ return atoi(CM);
+ }
+ }
+ return 64;
+}
+
+
void purge_empty_chans(void)
{
int go_again = 1, purge = 0;