From 7f4ee2f9f2e3af860d4c4eaa19d8f12611e5fe83 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 7 Jul 2006 22:46:35 +0000 Subject: Add channel modes +n and +t git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4156 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/cmode_t.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/modes/cmode_t.cpp (limited to 'src/modes/cmode_t.cpp') diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp new file mode 100644 index 000000000..ed4285f0c --- /dev/null +++ b/src/modes/cmode_t.cpp @@ -0,0 +1,23 @@ +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" +#include "modes/cmode_t.h" + +ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler('t', 0, 0, false, MODETYPE_CHANNEL, false) +{ +} + +ModeAction ModeChannelTopicOps::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +{ + if (channel->modes[CM_OPTOPIC] != adding) + { + channel->modes[CM_OPTOPIC] = adding; + return MODEACTION_ALLOW; + } + else + { + return MODEACTION_DENY; + } +} + -- cgit v1.2.3