mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Add an option to allow channel ops to enable the permchannels mode.
Closes #1964.
This commit is contained in:
parent
24229f59f7
commit
2b2a3a31d7
@ -1787,9 +1787,14 @@
|
||||
#
|
||||
# 'saveperiod' determines how often to check if the database needs to be
|
||||
# saved to disk. Defaults to every five seconds.
|
||||
#
|
||||
# 'operonly' determines whether a server operator or services server is
|
||||
# needed to enable the permchannels mode. You should generally keep this
|
||||
# set to yes unless you know what you are doing.
|
||||
#<permchanneldb filename="permchannels.conf"
|
||||
# listmodes="yes"
|
||||
# saveperiod="5s">
|
||||
# saveperiod="5s"
|
||||
# operonly="yes">
|
||||
#<include file="permchannels.conf" missingokay="yes">
|
||||
#
|
||||
# You may also create channels on startup by using the <permchannels> block.
|
||||
|
@ -52,6 +52,11 @@ class PermChannel : public ModeHandler
|
||||
|
||||
return MODEACTION_ALLOW;
|
||||
}
|
||||
|
||||
void SetOperOnly(bool value)
|
||||
{
|
||||
oper = value;
|
||||
}
|
||||
};
|
||||
|
||||
// Not in a class due to circular dependency hell.
|
||||
@ -190,6 +195,7 @@ public:
|
||||
ConfigTag* tag = ServerInstance->Config->ConfValue("permchanneldb");
|
||||
permchannelsconf = tag->getString("filename");
|
||||
save_listmodes = tag->getBool("listmodes", true);
|
||||
p.SetOperOnly(tag->getBool("operonly", true));
|
||||
SetInterval(tag->getDuration("saveperiod", 5));
|
||||
|
||||
if (!permchannelsconf.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user