diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-06 10:04:51 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-06 10:04:51 +0000 |
commit | f25f6319d5ae3eb1c48fcc84cb49c9cf08c439a5 (patch) | |
tree | ff9e0af9349adb827f0a061ec8d13b10b8db0160 | |
parent | 7ce1303cab4b56478b209f95c7958eea61a5d083 (diff) |
Drop channel keys if they are identical to the already-set key (fix for bug #756, reported by Taros)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11178 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modes/cmode_k.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 3540346b5..2ee839efa 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -73,6 +73,11 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s /* Key is currently set and the correct key wasnt given */ return MODEACTION_DENY; } + else if (channel->IsModeSet('k') && parameter == channel->GetModeParameter('k')) + { + /* Key is currently set, setting to the same as it already is.. drop it */ + return MODEACTION_DENY; + } else if ((!channel->IsModeSet('k')) || ((adding) && (!IS_LOCAL(source)))) { /* Key isnt currently set */ |