diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 14:22:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 14:22:55 +0000 |
commit | 4cb72aee7374889ce3f11a0ff516ac716c16b5b7 (patch) | |
tree | c929ac7dec07f0d288c73b98d5184c06fe335c02 /src/modes/cmode_s.cpp | |
parent | 598aedf098347155dfd589c0040b9ddf190a6d29 (diff) |
Added cmode_s, skeleton mode handler for channel mode +s.
The naming convention for this dir is as follows: cmode_* -> channel modes
umode_* -> user modes.
Case sensitive mode letters on the end of the name such as cmode_s etc. Note,
this dir can only hold the core RFC modes, so we won't get name collisions e.g.
S and s.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4123 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes/cmode_s.cpp')
-rw-r--r-- | src/modes/cmode_s.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp new file mode 100644 index 000000000..16c446eec --- /dev/null +++ b/src/modes/cmode_s.cpp @@ -0,0 +1,19 @@ +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" + +class ModeChannelSecret : public ModeHandler +{ + 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; + } +}; + |