X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_i.cpp;h=60183b001186065122fa5ffd9024371ab8342137;hb=86775e2e98f55b3b88befe2daff0ca23f02f3155;hp=12bdb18b815c7010c8174d649a6f6dfa968c493d;hpb=a7cbd51d457a5e3b435396092bc7e2fcf79168e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_i.cpp b/src/modes/cmode_i.cpp index 12bdb18b8..60183b001 100644 --- a/src/modes/cmode_i.cpp +++ b/src/modes/cmode_i.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * 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. @@ -17,19 +17,7 @@ #include "users.h" #include "modes/cmode_i.h" -ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : ModeHandler(Instance, 'i', 0, 0, false, MODETYPE_CHANNEL, false) +ModeChannelInviteOnly::ModeChannelInviteOnly(InspIRCd* Instance) : SimpleChannelModeHandler(Instance, NULL, 'i') { } -ModeAction ModeChannelInviteOnly::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) -{ - if (channel->modes[CM_INVITEONLY] != adding) - { - channel->modes[CM_INVITEONLY] = adding; - return MODEACTION_ALLOW; - } - else - { - return MODEACTION_DENY; - } -}