]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modes/cmode_p.cpp
Mode +b stuff, probably wont work yet
[user/henk/code/inspircd.git] / src / modes / cmode_p.cpp
1 #include "inspircd.h"
2 #include "mode.h"
3 #include "channels.h"
4 #include "users.h"
5 #include "modes/cmode_p.h"
6
7 ModeChannelPrivate::ModeChannelPrivate() : ModeHandler('p', 0, 0, false, MODETYPE_CHANNEL, false)
8 {
9 }
10
11 ModeAction ModeChannelPrivate::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
12 {
13         if (channel->modes[CM_PRIVATE] != adding)
14         {
15                 channel->modes[CM_PRIVATE] = adding;
16                 return MODEACTION_ALLOW;
17         }
18         else
19         {
20                 return MODEACTION_DENY;
21         }
22 }