1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 00:06:39 +02:00

Added command aliases

This commit is contained in:
Adam
2010-11-14 15:12:32 -05:00
parent c792c7f62d
commit 3c9d4e9daf
16 changed files with 186 additions and 64 deletions
+2 -7
View File
@@ -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);