diff options
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 7f843eeeb..004acc3f8 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -215,9 +215,10 @@ Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool */ if (IS_LOCAL(user) && !override) { - if (user->GetMaxChans()) + // Checking MyClass exists because we *may* get here with NULL, not 100% sure. + if (user->MyClass && user->MyClass->GetMaxChans()) { - if (user->chans.size() >= user->GetMaxChans()) + if (user->chans.size() >= user->MyClass->GetMaxChans()) { user->WriteNumeric(ERR_TOOMANYCHANNELS, "%s %s :You are on too many channels",user->nick.c_str(), cn); return NULL; |