mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -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
|
# 'saveperiod' determines how often to check if the database needs to be
|
||||||
# saved to disk. Defaults to every five seconds.
|
# 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"
|
#<permchanneldb filename="permchannels.conf"
|
||||||
# listmodes="yes"
|
# listmodes="yes"
|
||||||
# saveperiod="5s">
|
# saveperiod="5s"
|
||||||
|
# operonly="yes">
|
||||||
#<include file="permchannels.conf" missingokay="yes">
|
#<include file="permchannels.conf" missingokay="yes">
|
||||||
#
|
#
|
||||||
# You may also create channels on startup by using the <permchannels> block.
|
# You may also create channels on startup by using the <permchannels> block.
|
||||||
|
@ -52,6 +52,11 @@ class PermChannel : public ModeHandler
|
|||||||
|
|
||||||
return MODEACTION_ALLOW;
|
return MODEACTION_ALLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetOperOnly(bool value)
|
||||||
|
{
|
||||||
|
oper = value;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not in a class due to circular dependency hell.
|
// Not in a class due to circular dependency hell.
|
||||||
@ -190,6 +195,7 @@ public:
|
|||||||
ConfigTag* tag = ServerInstance->Config->ConfValue("permchanneldb");
|
ConfigTag* tag = ServerInstance->Config->ConfValue("permchanneldb");
|
||||||
permchannelsconf = tag->getString("filename");
|
permchannelsconf = tag->getString("filename");
|
||||||
save_listmodes = tag->getBool("listmodes", true);
|
save_listmodes = tag->getBool("listmodes", true);
|
||||||
|
p.SetOperOnly(tag->getBool("operonly", true));
|
||||||
SetInterval(tag->getDuration("saveperiod", 5));
|
SetInterval(tag->getDuration("saveperiod", 5));
|
||||||
|
|
||||||
if (!permchannelsconf.empty())
|
if (!permchannelsconf.empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user