diff options
author | Adam <Adam@anope.org> | 2012-02-08 18:00:24 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-02-08 18:00:24 -0500 |
commit | 1bc8e2ab82db9ce00faaa44887338873a2cd9210 (patch) | |
tree | 22523f23f143af444fbb79fdc252966b2e44c5ff /modules/commands/os_session.cpp | |
parent | 089c85b27e0674dc8102b15e507ebdd7386eeb87 (diff) |
Removed operserv:notifications in favor of log blocks, as well as some other notifiications
Diffstat (limited to 'modules/commands/os_session.cpp')
-rw-r--r-- | modules/commands/os_session.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index c35be7b09..12267b651 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -100,9 +100,7 @@ class ExpireTimer : public Timer if (!e->expires || e->expires > Anope::CurTime) continue; - BotInfo *bi = findbot(Config->OperServ); - if (Config->WallExceptionExpire && bi) - ircdproto->SendGlobops(bi, "Session exception for %s has expired.", e->mask.c_str()); + Log(findbot(Config->OperServ), "expire/exception") << "Session exception for " << e->mask << "has expired."; session_service->DelException(e); delete e; } @@ -646,8 +644,6 @@ class OSSession : public Module u->SendMessage(bi, "%s", Config->SessionLimitDetailsLoc.c_str()); } - u->Kill(Config->OperServ, "Session limit exceeded"); - ++session->hits; if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill && akills) { @@ -655,8 +651,12 @@ class OSSession : public Module XLine *x = new XLine(akillmask, Config->OperServ, Anope::CurTime + Config->SessionAutoKillExpiry, "Session limit exceeded", XLineManager::GenerateUID()); akills->AddXLine(x); akills->Send(NULL, x); - if (bi) - ircdproto->SendGlobops(bi, "Added a temporary AKILL for \2%s\2 due to excessive connections", akillmask.c_str()); + Log(bi, "akill/session") << "Added a temporary AKILL for \2" << akillmask << "\2 due to excessive connections"; + } + else + { + u->Kill(Config->OperServ, "Session limit exceeded"); + u = NULL; /* No guarentee u still exists */ } } } |