cmode_t.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include "inspircd.h"
00015 #include "mode.h"
00016 #include "channels.h"
00017 #include "users.h"
00018 #include "modes/cmode_t.h"
00019
00020 ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Instance, 't', 0, 0, false, MODETYPE_CHANNEL, false)
00021 {
00022 }
00023
00024 ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding, bool servermode)
00025 {
00026 if (channel->modes[CM_TOPICLOCK] != adding)
00027 {
00028 channel->modes[CM_TOPICLOCK] = adding;
00029 return MODEACTION_ALLOW;
00030 }
00031 else
00032 {
00033 return MODEACTION_DENY;
00034 }
00035 }
00036