diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-20 18:54:50 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-20 18:54:50 +0000 |
commit | fa6e82fe50ebb3140f6e31cc128cac9e442bccbd (patch) | |
tree | d7d3183b531d17c88efd5f468961627e9513a430 | |
parent | df8cc91c963ee85cd45d6351d35f5524f7929a6a (diff) |
Allow invex to bypass key
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12505 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | docs/modules.conf.example | 2 | ||||
-rw-r--r-- | src/modules/m_inviteexception.cpp | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/modules.conf.example b/docs/modules.conf.example index 945d54fcd..30f25e820 100644 --- a/docs/modules.conf.example +++ b/docs/modules.conf.example @@ -933,6 +933,8 @@ #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Invite except module: Adds support for channel invite exceptions (+I) #<module name="m_inviteexception.so"> +# Does a +I bypass channel +k in addition to +i? +#<inviteexception bypasskey="yes"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Invisible module - Adds support for usermode +Q (quiet) which lets an diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index d90231081..2e6f6db65 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -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); |