1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 05:13:12 +02:00

added missing support for operonly and silentoperonly in os_defcon

This commit is contained in:
DukePyrolator
2014-09-14 11:11:22 +02:00
parent 19b47c7bae
commit 8e7b742ec7
+10 -1
View File
@@ -439,7 +439,16 @@ class OSDefcon : public Module
EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> &params) anope_override
{
if (command->name == "nickserv/register" || command->name == "nickserv/group")
if (Config.Check(DEFCON_OPER_ONLY) && !source.IsOper())
{
source.Reply(_("Services are in DefCon mode, please try again later."));
return EVENT_STOP;
}
else if (DConfig.Check(DEFCON_SILENT_OPER_ONLY) && !source.IsOper())
{
return EVENT_STOP;
}
else if (command->name == "nickserv/register" || command->name == "nickserv/group")
{
if (DConfig.Check(DEFCON_NO_NEW_NICKS))
{