summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:04:36 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:04:36 +0000
commitace37813034e91b0972ba84962814571644f2eee (patch)
tree3c0a86268788cdfb11f87041fe74f0b888e033ea /src/modes
parent182efa70e5410826441f6fbffa66afed094a6ac3 (diff)
Mode parser WORKS! (for simple non-parameterized channel modes)
Tested with channel mode +s. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4126 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_s.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp
index 6a27dddfd..f6ae9a2f4 100644
--- a/src/modes/cmode_s.cpp
+++ b/src/modes/cmode_s.cpp
@@ -10,6 +10,13 @@ ModeChannelSecret::ModeChannelSecret() : ModeHandler('s', 0, 0, 0, MODETYPE_CHAN
ModeAction ModeChannelSecret::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
- channel->modes[CM_SECRET] = adding;
- return MODEACTION_ALLOW;
+ if (channel->modes[CM_SECRET] != adding)
+ {
+ channel->modes[CM_SECRET] = adding;
+ return MODEACTION_ALLOW;
+ }
+ else
+ {
+ return MODEACTION_DENY;
+ }
}