#include "inspircd.h" #include "mode.h" #include "channels.h" #include "users.h" #include "modes/cmode_t.h" ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler('t', 0, 0, false, MODETYPE_CHANNEL, false) { } ModeAction ModeChannelTopicOps::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { if (channel->modes[CM_OPTOPIC] != adding) { channel->modes[CM_OPTOPIC] = adding; return MODEACTION_ALLOW; } else { return MODEACTION_DENY; } }