summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-27 11:56:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-27 11:56:08 +0000
commit354cf0401283c67a6cf8962dfb55fc0558662cdd (patch)
treeadb6ec331dcebc42ed40c839d249985f3266eeac
parentd0b88e61788c4b0d3e3d39097ba4e87f5cdb0454 (diff)
Fix the remote +k-k stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4554 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modes/cmode_k.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index b1cfac1e9..5e55ce972 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -23,11 +23,12 @@ std::pair<bool,std::string> ModeChannelKey::ModeSet(userrec* source, userrec* de
ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
- if (channel->modes[CM_KEY] != adding)
+ if ((channel->modes[CM_KEY] != adding) || (!IS_LOCAL(source)))
{
- if ((channel->modes[CM_KEY]) && (strcasecmp(parameter.c_str(),channel->key)))
+ if (((channel->modes[CM_KEY]) && (strcasecmp(parameter.c_str(),channel->key))) && (IS_LOCAL(source)))
{
/* Key is currently set and the correct key wasnt given */
+ log(DEBUG,"Key Cond 2");
return MODEACTION_DENY;
}
else if ((!channel->modes[CM_KEY]) || ((adding) && (!IS_LOCAL(source))))
@@ -44,10 +45,12 @@ ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec*
channel->modes[CM_KEY] = adding;
return MODEACTION_ALLOW;
}
+ log(DEBUG,"Key Cond three");
return MODEACTION_DENY;
}
else
{
+ log(DEBUG,"Key Condition one");
return MODEACTION_DENY;
}
}