The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

cmode_t.cpp

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
00006  * See: http://www.inspircd.org/wiki/index.php/Credits
00007  *
00008  * This program is free but copyrighted software; see
00009  *            the file COPYING for details.
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