summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/users.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp
index dbe179989..b945e3238 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1763,7 +1763,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
if (found)
{
/* deny change if change will take class over the limit */
- if (found->RefCount + 1 >= found->limit)
+ if (found->limit && (found->RefCount + 1 >= found->limit))
{
ServerInstance->Log(DEBUG, "OOPS: Connect class limit (%u) hit, denying", found->limit);
return this->MyClass;