diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modes/cmode_p.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modes/cmode_p.cpp b/src/modes/cmode_p.cpp new file mode 100644 index 000000000..7ebdbf499 --- /dev/null +++ b/src/modes/cmode_p.cpp @@ -0,0 +1,22 @@ +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" +#include "modes/cmode_p.h" + +ModeChannelPrivate::ModeChannelPrivate() : ModeHandler('s', 0, 0, 0, MODETYPE_CHANNEL, false) +{ +} + +ModeAction ModeChannelPrivate::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +{ + if (channel->modes[CM_PRIVATE] != adding) + { + channel->modes[CM_PRIVATE] = adding; + return MODEACTION_ALLOW; + } + else + { + return MODEACTION_DENY; + } +} |