X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fmodes%2Fcmode_t.cpp;h=627717f33356fbcd7ece0ab6953e04d529eb65a5;hb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;hp=def48a7811c6804d0401a030b5293bc980b45c36;hpb=bab14f0dd2345c9d7dcbc47c918563709e1ac094;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp index def48a781..627717f33 100644 --- a/src/modes/cmode_t.cpp +++ b/src/modes/cmode_t.cpp @@ -1 +1,36 @@ -/* +------------------------------------+ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * * InspIRCd: (C) 2002-2007 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see * the file COPYING for details. * * --------------------------------------------------- */ #include "inspircd.h" #include "mode.h" #include "channels.h" #include "users.h" #include "modes/cmode_t.h" ModeChannelTopicOps::ModeChannelTopicOps(InspIRCd* Instance) : ModeHandler(Instance, '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_TOPICLOCK] != adding) { channel->modes[CM_TOPICLOCK] = adding; return MODEACTION_ALLOW; } else { return MODEACTION_DENY; } } \ No newline at end of file +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#include "inspircd.h" +#include "mode.h" +#include "channels.h" +#include "users.h" +#include "modes/cmode_t.h" + +ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler(NULL, 't', PARAM_NONE, MODETYPE_CHANNEL) +{ +} + +ModeAction ModeChannelTopicOps::OnModeChange(User*, User*, Channel* channel, std::string&, bool adding) +{ + if (channel->modes[CM_TOPICLOCK] != adding) + { + channel->modes[CM_TOPICLOCK] = adding; + return MODEACTION_ALLOW; + } + else + { + return MODEACTION_DENY; + } +} +