X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_p.cpp;h=d5f52eb78cf31a1e6091f072916d052d8b045dd8;hb=7892c8a0313c50d8138942ff3b112691caf05a2f;hp=ef4892fc3ab8a53471cb5c7943b35ee3aacc88c7;hpb=8f9d0a68cd77b6a78eccfa7df9c1045d453ce581;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_p.cpp b/src/modes/cmode_p.cpp index ef4892fc3..d5f52eb78 100644 --- a/src/modes/cmode_p.cpp +++ b/src/modes/cmode_p.cpp @@ -1,22 +1,23 @@ +/* +------------------------------------+ + * | 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_p.h" -ModeChannelPrivate::ModeChannelPrivate() : ModeHandler('p', 0, 0, false, MODETYPE_CHANNEL, false) +ModeChannelPrivate::ModeChannelPrivate(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, NULL, 'p') { } -ModeAction ModeChannelPrivate::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) -{ - if (channel->modes[CM_PRIVATE] != adding) - { - channel->modes[CM_PRIVATE] = adding; - return MODEACTION_ALLOW; - } - else - { - return MODEACTION_DENY; - } -}