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 | |
parent | 089c85b27e0674dc8102b15e507ebdd7386eeb87 (diff) |
Removed operserv:notifications in favor of log blocks, as well as some other notifiications
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/os_defcon.cpp | 8 | ||||
-rw-r--r-- | modules/commands/os_forbid.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_module.cpp | 6 | ||||
-rw-r--r-- | modules/commands/os_oline.cpp | 4 | ||||
-rw-r--r-- | modules/commands/os_session.cpp | 14 | ||||
-rw-r--r-- | modules/commands/os_set.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_svsnick.cpp | 2 |
7 files changed, 20 insertions, 18 deletions
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 7e40a5c02..3bd1fc111 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -549,13 +549,17 @@ class OSDefcon : public Module if (!Config->SessionLimitDetailsLoc.empty()) ircdproto->SendMessage(findbot(Config->OperServ), u->nick, "%s", Config->SessionLimitDetailsLoc.c_str()); - u->Kill(Config->OperServ, "Defcon session limit exceeded"); ++session->hits; if (akills && Config->MaxSessionKill && session->hits >= Config->MaxSessionKill) { XLine x("*@" + u->host, Config->OperServ, Anope::CurTime + Config->SessionAutoKillExpiry, "Defcon session limit exceeded", XLineManager::GenerateUID()); akills->Send(NULL, &x); - ircdproto->SendGlobops(findbot(Config->OperServ), "[DEFCON] Added a temporary AKILL for \2*@%s\2 due to excessive connections", u->host.c_str()); + Log(findbot(Config->OperServ), "akill/defcon") << "[DEFCON] Added a temporary AKILL for \2*@" << u->host << "\2 due to excessive connections"; + } + else + { + u->Kill(Config->OperServ, "Defcon session limit exceeded"); + u = NULL; /* No guarentee u still exists */ } } } diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index a60b362db..7d20c5539 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -63,7 +63,7 @@ class MyForbidService : public ForbidService else if (d->type == FT_EMAIL) ftype = "email"; - Log(LOG_NORMAL, Config->OperServ + "/forbid") << "Expiring forbid for " << d->mask << " type " << ftype; + Log(LOG_NORMAL, "expire/forbid") << "Expiring forbid for " << d->mask << " type " << ftype; this->forbidData.erase(this->forbidData.begin() + i - 1); delete d; } diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp index 074cc1c1a..196a9bed8 100644 --- a/modules/commands/os_module.cpp +++ b/modules/commands/os_module.cpp @@ -30,7 +30,7 @@ class CommandOSModLoad : public Command ModuleReturn status = ModuleManager::LoadModule(mname, u); if (status == MOD_ERR_OK) { - ircdproto->SendGlobops(source.owner, "%s loaded module %s", u->nick.c_str(), mname.c_str()); + Log(LOG_ADMIN, u, this) << "to load module " << mname; source.Reply(_("Module \002%s\002 loaded"), mname.c_str()); } else if (status == MOD_ERR_EXISTS) @@ -91,7 +91,7 @@ class CommandOSModReLoad : public Command status = ModuleManager::LoadModule(mname, u); if (status == MOD_ERR_OK) { - ircdproto->SendGlobops(source.owner, "%s reloaded module %s", u->nick.c_str(), mname.c_str()); + Log(LOG_ADMIN, u, this) << "to reload module " << mname; source.Reply(_("Module \002%s\002 reloaded"), mname.c_str()); } else @@ -150,8 +150,8 @@ class CommandOSModUnLoad : public Command if (status == MOD_ERR_OK) { + Log(LOG_ADMIN, u, this) << "to unload module " << mname; source.Reply(_("Module \002%s\002 unloaded"), mname.c_str()); - ircdproto->SendGlobops(source.owner, "%s unloaded module %s", u->nick.c_str(), mname.c_str()); } else source.Reply(_("Unable to remove module \002%s\002"), mname.c_str()); diff --git a/modules/commands/os_oline.cpp b/modules/commands/os_oline.cpp index 6daae2fed..9ce76d95c 100644 --- a/modules/commands/os_oline.cpp +++ b/modules/commands/os_oline.cpp @@ -38,13 +38,13 @@ class CommandOSOLine : public Command u2->SetMode(source.owner, UMODE_OPER); u2->SendMessage(source.owner, _("You are now an IRC Operator.")); source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str()); - ircdproto->SendGlobops(source.owner, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str()); + Log(LOG_ADMIN, u, this) << "for " << nick; } else if (u2 && flag[0] == '-') { ircdproto->SendSVSO(Config->OperServ, nick, flag); source.Reply(_("Operflags \002%s\002 have been added for \002%s\002."), flag.c_str(), nick.c_str()); - ircdproto->SendGlobops(source.owner, "\2%s\2 used OLINE for %s", u->nick.c_str(), nick.c_str()); + Log(LOG_ADMIN, u, this) << "for " << nick; } else this->OnSyntaxError(source, ""); 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 */ } } } diff --git a/modules/commands/os_set.cpp b/modules/commands/os_set.cpp index fbdfd2814..1cea0e90c 100644 --- a/modules/commands/os_set.cpp +++ b/modules/commands/os_set.cpp @@ -84,14 +84,12 @@ class CommandOSSet : public Command u->SuperAdmin = true; source.Reply(_("You are now a SuperAdmin")); Log(LOG_ADMIN, u, this) << "SUPERADMIN ON"; - ircdproto->SendGlobops(source.owner, _("%s is now a Super-Admin"), u->nick.c_str()); } else if (setting.equals_ci("OFF")) { u->SuperAdmin = false; source.Reply(_("You are no longer a SuperAdmin")); Log(LOG_ADMIN, u, this) << "SUPERADMIN OFF"; - ircdproto->SendGlobops(source.owner, _("%s is no longer a Super-Admin"), u->nick.c_str()); } else source.Reply(_("Setting for SuperAdmin must be \002on\002 or \002off\002 (must be enabled in services.conf)")); diff --git a/modules/commands/os_svsnick.cpp b/modules/commands/os_svsnick.cpp index 1d88779b1..be5f8c320 100644 --- a/modules/commands/os_svsnick.cpp +++ b/modules/commands/os_svsnick.cpp @@ -57,7 +57,7 @@ class CommandOSSVSNick : public Command else { source.Reply(_("The nick \002%s\002 is now being changed to \002%s\002."), nick.c_str(), newnick.c_str()); - ircdproto->SendGlobops(source.owner, "%s used SVSNICK to change %s to %s", u->nick.c_str(), nick.c_str(), newnick.c_str()); + Log(LOG_ADMIN, u, this) << "to change " << nick << " to " << newnick; ircdproto->SendForceNickChange(u2, newnick, Anope::CurTime); } return; |