summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 20:03:17 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 20:03:17 +0000
commitadb17635ee183184a341accb5dfb275c34fb8fb0 (patch)
tree4936fc49695c49fd8951db120d26eac19c1bac2c /src
parent9e014442c5890839adf5c412dc3934a0a35fbbfd (diff)
Added cmode_m (channel mode +m)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4141 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modes/cmode_m.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modes/cmode_m.cpp b/src/modes/cmode_m.cpp
new file mode 100644
index 000000000..b3c41df12
--- /dev/null
+++ b/src/modes/cmode_m.cpp
@@ -0,0 +1,23 @@
+#include "inspircd.h"
+#include "mode.h"
+#include "channels.h"
+#include "users.h"
+#include "modes/cmode_m.h"
+
+ModeChannelModerated::ModeChannelModerated() : ModeHandler('m', 0, 0, false, MODETYPE_CHANNEL, false)
+{
+}
+
+ModeAction ModeChannelModerated::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
+{
+ if (channel->modes[CM_MODERATED] != adding)
+ {
+ channel->modes[CM_MODERATED] = adding;
+ return MODEACTION_ALLOW;
+ }
+ else
+ {
+ return MODEACTION_DENY;
+ }
+}
+