summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-06 11:03:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-06 11:03:23 +0000
commitae57bb2c425a2c90df790d550ebf4c5190d53934 (patch)
tree9bf6ff881d210465fbf07f64048ee41e22092a59 /src/helperfuncs.cpp
parentcf0748219e887e05a264d4b7176436e446d6b674 (diff)
maxbans fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3495 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 4a48d93f1..854675378 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1098,10 +1098,14 @@ chanrec* FindChan(const char* chan)
long GetMaxBans(char* name)
{
+ std::string x;
for (std::map<std::string,int>::iterator n = Config->maxbans.begin(); n != Config->maxbans.end(); n++)
{
- if (match(name,n->first->c_str()))
- return atoi(n->second);
+ x = n->first;
+ if (match(name,x.c_str()))
+ {
+ return n->second;
+ }
}
return 64;
}