diff options
-rw-r--r-- | src/modules/m_chanprotect.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 2951e711b..5a6e4853d 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -86,12 +86,12 @@ class FounderProtectBase if ((!theuser) || (!channel->HasUser(theuser))) { parameter = ""; - return theuser; + return NULL; } - return NULL; + return theuser; } - ModeAction HandleChange(userrec* source, userrec*theuser, bool adding, chanrec* channel, std::string ¶meter) + ModeAction HandleChange(userrec* source, userrec* theuser, bool adding, chanrec* channel, std::string ¶meter) { std::string item = extend+std::string(channel->name); @@ -140,7 +140,9 @@ class ChanFounder : public ModeHandler, public FounderProtectBase userrec* theuser = FounderProtectBase::FindAndVerify(parameter, channel); if (!theuser) + { return MODEACTION_DENY; + } // source is a server, or ulined, we'll let them +-q the user. if ((ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server) || (!IS_LOCAL(source))) |