From 2d05d8bc330256252e22b8b8aede3504d8d4dca6 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 7 Jul 2006 14:31:05 +0000 Subject: Header for cmode_s.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4124 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 5 +++++ src/modes/cmode_s.cpp | 20 ++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/mode.cpp b/src/mode.cpp index d2ecbf369..ace7d1286 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1749,3 +1749,8 @@ void ModeParser::ServerMode(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]); } } + +ModeParser::ModeParser() +{ + cmode_s = new ModeChannelSecret(); +} diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp index 16c446eec..6a27dddfd 100644 --- a/src/modes/cmode_s.cpp +++ b/src/modes/cmode_s.cpp @@ -2,18 +2,14 @@ #include "mode.h" #include "channels.h" #include "users.h" +#include "modes/cmode_s.h" -class ModeChannelSecret : public ModeHandler +ModeChannelSecret::ModeChannelSecret() : ModeHandler('s', 0, 0, 0, MODETYPE_CHANNEL, false) { - public: - ModeChannelSecret() : ModeHandler('s', 0, 0, 0, MODETYPE_CHANNEL, false) - { - } - - ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) - { - channel->modes[CM_SECRET] = adding; - return MODEACTION_ALLOW; - } -}; +} +ModeAction ModeChannelSecret::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +{ + channel->modes[CM_SECRET] = adding; + return MODEACTION_ALLOW; +} -- cgit v1.2.3