summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 2ff939dc6..fd39aa0b1 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1153,16 +1153,16 @@ int usercount(chanrec *c)
// looks up a users password for their connection class (<ALLOW>/<DENY> tags)
-ConnectClass* GetClass(userrec *user)
+ConnectClass GetClass(userrec *user)
{
for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
{
if (match(user->host,i->host.c_str()))
{
- return (ConnectClass*)i->second;
+ return *i;
}
}
- return "";
+ return *(Config->Classes.begin());
}
/* sends out an error notice to all connected clients (not to be used