mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Allow invex to bypass key
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12505 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
df8cc91c96
commit
fa6e82fe50
@ -933,6 +933,8 @@
|
|||||||
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
|
||||||
# Invite except module: Adds support for channel invite exceptions (+I)
|
# Invite except module: Adds support for channel invite exceptions (+I)
|
||||||
#<module name="m_inviteexception.so">
|
#<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
|
# Invisible module - Adds support for usermode +Q (quiet) which lets an
|
||||||
|
@ -45,8 +45,8 @@ public:
|
|||||||
throw ModuleException("Could not add new modes!");
|
throw ModuleException("Could not add new modes!");
|
||||||
|
|
||||||
ie.DoImplements(this);
|
ie.DoImplements(this);
|
||||||
Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite };
|
Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey };
|
||||||
ServerInstance->Modules->Attach(eventlist, this, 2);
|
ServerInstance->Modules->Attach(eventlist, this, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void On005Numeric(std::string &output)
|
void On005Numeric(std::string &output)
|
||||||
@ -74,6 +74,13 @@ public:
|
|||||||
return MOD_RES_PASSTHRU;
|
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)
|
void OnCleanup(int target_type, void* item)
|
||||||
{
|
{
|
||||||
ie.DoCleanup(target_type, item);
|
ie.DoCleanup(target_type, item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user