summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}