summaryrefslogtreecommitdiff
path: root/modules/core/os_defcon.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-11-14 15:12:32 -0500
committerAdam <Adam@anope.org>2010-12-12 19:33:58 -0500
commit3c9d4e9dafdd0918a3539e545cc99646e604757d (patch)
tree5206bf59ad26698932ca0119b2c04a5f70c88946 /modules/core/os_defcon.cpp
parentc792c7f62df41c48d0d813a809e5415cbefa38b2 (diff)
Added command aliases
Diffstat (limited to 'modules/core/os_defcon.cpp')
-rw-r--r--modules/core/os_defcon.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/modules/core/os_defcon.cpp b/modules/core/os_defcon.cpp
index 89bc2b6f0..e17a6d33a 100644
--- a/modules/core/os_defcon.cpp
+++ b/modules/core/os_defcon.cpp
@@ -205,14 +205,9 @@ class OSDefcon : public Module
return EVENT_CONTINUE;
}
- EventReturn OnPreCommandRun(User *u, BotInfo *bi, const Anope::string &command, const Anope::string &message, Command *c)
+ EventReturn OnPreCommandRun(User *u, BotInfo *bi, Anope::string &command, Anope::string &message, bool fantasy)
{
- if (!c)
- {
- if (CheckDefCon(DEFCON_SILENT_OPER_ONLY) && !is_oper(u))
- return EVENT_STOP;
- }
- if ((CheckDefCon(DEFCON_OPER_ONLY) || CheckDefCon(DEFCON_SILENT_OPER_ONLY)) && !is_oper(u))
+ if (!is_oper(u) && CheckDefCon(DEFCON_OPER_ONLY) || CheckDefCon(DEFCON_SILENT_OPER_ONLY))
{
if (!CheckDefCon(DEFCON_SILENT_OPER_ONLY))
u->SendMessage(bi, OPER_DEFCON_DENIED);