diff options
author | Adam <Adam@anope.org> | 2010-12-06 17:06:57 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-12-12 19:37:03 -0500 |
commit | aed53dbb47822a79eb9a6b61095ad04ec3d67818 (patch) | |
tree | 72d3210b5609ea2163854d14ec7fb2f48d8b4d12 /modules/core/os_defcon.cpp | |
parent | a507816701d136a1c22d2f6779d811840d61577c (diff) |
Cleaned up some things, made the protocol modules use some basic inheritance to cut back on their code duplication. More work can be done in the future to remove even more of it.
Diffstat (limited to 'modules/core/os_defcon.cpp')
-rw-r--r-- | modules/core/os_defcon.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/core/os_defcon.cpp b/modules/core/os_defcon.cpp index 0dd9dcedb..cc8809586 100644 --- a/modules/core/os_defcon.cpp +++ b/modules/core/os_defcon.cpp @@ -164,7 +164,7 @@ class OSDefcon : public Module } if (CheckDefCon(DEFCON_NO_NEW_CLIENTS) || CheckDefCon(DEFCON_AKILL_NEW_CLIENTS)) - kill_user(Config->s_OperServ, u->nick, Config->DefConAkillReason); + kill_user(Config->s_OperServ, u, Config->DefConAkillReason); return EVENT_STOP; } @@ -208,7 +208,7 @@ class OSDefcon : public Module EventReturn OnPreCommandRun(User *u, BotInfo *bi, Anope::string &command, Anope::string &message, ChannelInfo *ci) { - if (!is_oper(u) && (CheckDefCon(DEFCON_OPER_ONLY) || CheckDefCon(DEFCON_SILENT_OPER_ONLY))) + if (!u->HasMode(UMODE_OPER) && (CheckDefCon(DEFCON_OPER_ONLY) || CheckDefCon(DEFCON_SILENT_OPER_ONLY))) { if (!CheckDefCon(DEFCON_SILENT_OPER_ONLY)) u->SendMessage(bi, OPER_DEFCON_DENIED); @@ -281,7 +281,7 @@ class OSDefcon : public Module if (!Config->SessionLimitDetailsLoc.empty()) ircdproto->SendMessage(OperServ, u->nick, "%s", Config->SessionLimitDetailsLoc.c_str()); - kill_user(Config->s_OperServ, u->nick, "Session limit exceeded"); + kill_user(Config->s_OperServ, u, "Session limit exceeded"); ++session->hits; if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill) { |