diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 22:55:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 22:55:47 +0000 |
commit | 40320969da824c4150134fa5177c02694c6b49bd (patch) | |
tree | b16bb2badaec5ae20dc4d6b3bf717561560a0ab0 /src/modes/cmode_i.cpp | |
parent | 65d52bb76385f0a3f49acc4217cc6212008d3b3e (diff) |
Add support for channelmode +i
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4159 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes/cmode_i.cpp')
-rw-r--r-- | src/modes/cmode_i.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/modes/cmode_i.cpp b/src/modes/cmode_i.cpp new file mode 100644 index 000000000..d74ac86e7 --- /dev/null +++ b/src/modes/cmode_i.cpp @@ -0,0 +1,22 @@ +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" +#include "modes/cmode_i.h" + +ModeChannelInviteOnly::ModeChannelInviteOnly() : ModeHandler('i', 0, 0, false, MODETYPE_CHANNEL, false) +{ +} + +ModeAction ModeChannelInviteOnly::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) +{ + if (channel->modes[CM_INVITEONLY] != adding) + { + channel->modes[CM_INVITEONLY] = adding; + return MODEACTION_ALLOW; + } + else + { + return MODEACTION_DENY; + } +} |