X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_inviteexception.cpp;h=2e6f6db6533f98ea5cc7384ee73c5612f87e3448;hb=cb4c516ace8fef75b8a54a141c3644af9697ac0a;hp=9d0e0f54ecf1bde906450ecf16f7a09c98a629ba;hpb=7c55dfc7887b2ca91e4ebdf9f2733de8adb56e18;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 9d0e0f54e..2e6f6db65 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -45,8 +45,8 @@ public: throw ModuleException("Could not add new modes!"); ie.DoImplements(this); - Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite }; - ServerInstance->Modules->Attach(eventlist, this, 2); + Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey }; + ServerInstance->Modules->Attach(eventlist, this, 3); } void On005Numeric(std::string &output) @@ -74,6 +74,13 @@ public: return MOD_RES_PASSTHRU; } + ModResult OnCheckKey(User* user, Channel* chan, const std::string& key) + { + if (ServerInstance->Config->ConfValue("inviteexception")->getBool("bypasskey", true)) + return OnCheckInvite(user, chan); + return MOD_RES_PASSTHRU; + } + void OnCleanup(int target_type, void* item) { ie.DoCleanup(target_type, item); @@ -91,7 +98,7 @@ public: Version GetVersion() { - return Version("Provides support for the +I channel mode", VF_VENDOR | VF_COMMON); + return Version("Provides support for the +I channel mode", VF_VENDOR); } };