X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_i.cpp;h=3b79d6a152d108cc577c3516aeac13c1ff7fca4b;hb=8ab1381e8d277152d99a72f33f3d1c0564060fee;hp=12bdb18b815c7010c8174d649a6f6dfa968c493d;hpb=f2acdbc3820f0f4f5ef76a0a64e73d2a320df91f;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_i.cpp b/src/modes/cmode_i.cpp index 12bdb18b8..3b79d6a15 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() : SimpleChannelModeHandler(NULL, "invite", '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; - } -}