From 164b349ef9cfbc0f275333b60b0786848ce0f2e7 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 19 Jan 2016 16:25:02 -0500 Subject: Fix various inconsistencies/crashes related to having multiple opers configured for the same user through combinations of os_oper/config/m_sql_oper --- modules/commands/os_oper.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/commands') diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index 7b74af5ea..751c76cc9 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -135,6 +135,8 @@ class CommandOSOper : public Command source.Reply(_("Nick \002%s\002 is not a Services Operator."), oper.c_str()); else if (!HasPrivs(source, na->nc->o->ot)) source.Reply(ACCESS_DENIED); + else if (std::find(Config->Opers.begin(), Config->Opers.end(), na->nc->o) != Config->Opers.end()) + source.Reply(_("Oper \002%s\002 is configured in the configuration file(s) and can not be removed by this command."), na->nc->display.c_str()); else { delete na->nc->o; -- cgit