summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-28 17:39:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-28 17:39:25 +0000
commit77663a52c6147637fcdd2a6bf1797840daa8bff5 (patch)
tree1f0829b3b15f016dd43877feada801d7ad8c69d0 /src/modules/m_chanprotect.cpp
parentec9bd01f58ae5354dfe1bf05798f45ec836e02f6 (diff)
Hint of the day: When you have a function that can return a bool, dont mix up the true and false returns.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5050 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp8
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 &parameter)
+ ModeAction HandleChange(userrec* source, userrec* theuser, bool adding, chanrec* channel, std::string &parameter)
{
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)))