diff options
| author | Adam <Adam@anope.org> | 2011-02-12 16:17:17 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-02-12 16:17:17 -0500 |
| commit | 1372dc19537ce270f1f02979101f9b8678b5ff28 (patch) | |
| tree | d56f688ec113293a2e40c78d615558f1163dad7b /modules/core | |
| parent | 9ef7352e69bc092bba77a085dfa0f91a5793e038 (diff) | |
Removed the Wallop config options and replaced them with the new log system
Diffstat (limited to 'modules/core')
| -rw-r--r-- | modules/core/cs_forbid.cpp | 2 | ||||
| -rw-r--r-- | modules/core/cs_suspend.cpp | 6 | ||||
| -rw-r--r-- | modules/core/ns_drop.cpp | 5 | ||||
| -rw-r--r-- | modules/core/ns_forbid.cpp | 3 | ||||
| -rw-r--r-- | modules/core/ns_getpass.cpp | 4 | ||||
| -rw-r--r-- | modules/core/ns_saset.cpp | 3 | ||||
| -rw-r--r-- | modules/core/ns_suspend.cpp | 6 | ||||
| -rw-r--r-- | modules/core/os_akill.cpp | 33 | ||||
| -rw-r--r-- | modules/core/os_chankill.cpp | 4 | ||||
| -rw-r--r-- | modules/core/os_global.cpp | 3 | ||||
| -rw-r--r-- | modules/core/os_jupe.cpp | 3 | ||||
| -rw-r--r-- | modules/core/os_kick.cpp | 3 | ||||
| -rw-r--r-- | modules/core/os_mode.cpp | 6 | ||||
| -rw-r--r-- | modules/core/os_noop.cpp | 3 | ||||
| -rw-r--r-- | modules/core/os_snline.cpp | 34 | ||||
| -rw-r--r-- | modules/core/os_sqline.cpp | 34 | ||||
| -rw-r--r-- | modules/core/os_szline.cpp | 34 |
17 files changed, 12 insertions, 174 deletions
diff --git a/modules/core/cs_forbid.cpp b/modules/core/cs_forbid.cpp index d4dc42c68..dabf27f2b 100644 --- a/modules/core/cs_forbid.cpp +++ b/modules/core/cs_forbid.cpp @@ -85,8 +85,6 @@ class CommandCSForbid : public Command ircdproto->SendSQLine(&x); } - if (Config->WallForbid) - ircdproto->SendGlobops(ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick.c_str(), ci->name.c_str()); Log(LOG_ADMIN, u, this, ci) << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason"); source.Reply(_("Channel \002%s\002 is now forbidden."), chan.c_str()); diff --git a/modules/core/cs_suspend.cpp b/modules/core/cs_suspend.cpp index bce98c205..82eac64a2 100644 --- a/modules/core/cs_suspend.cpp +++ b/modules/core/cs_suspend.cpp @@ -64,9 +64,6 @@ class CommandCSSuspend : public Command } } - if (Config->WallForbid) - ircdproto->SendGlobops(ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str()); - Log(LOG_ADMIN, u, this, ci) << (!reason.empty() ? reason : "No reason"); source.Reply(_("Channel \002%s\002 is now suspended."), ci->name.c_str()); @@ -123,9 +120,6 @@ class CommandCSUnSuspend : public Command ci->forbidreason.clear(); ci->forbidby.clear(); - if (Config->WallForbid) - ircdproto->SendGlobops(ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str()); - source.Reply(_("Channel \002%s\002 is now released."), ci->name.c_str()); FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci)); diff --git a/modules/core/ns_drop.cpp b/modules/core/ns_drop.cpp index cc407e1b2..83981fe0e 100644 --- a/modules/core/ns_drop.cpp +++ b/modules/core/ns_drop.cpp @@ -39,9 +39,6 @@ class CommandNSDrop : public Command NickRequest *nr = findrequestnick(u->Account() && !nick.empty() ? nick : u->nick); if (nr && u->Account() && u->Account()->IsServicesOper()) { - if (Config->WallDrop) - ircdproto->SendGlobops(NickServ, "\2%s\2 used DROP on \2%s\2", u->nick.c_str(), nick.c_str()); - Log(LOG_ADMIN, u, this) << "to drop nickname " << nr->nick << " (email: " << nr->email << ")"; delete nr; source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str()); @@ -99,8 +96,6 @@ class CommandNSDrop : public Command if (!is_mine) { - if (Config->WallDrop) - ircdproto->SendGlobops(NickServ, "\2%s\2 used DROP on \2%s\2", u->nick.c_str(), nick.c_str()); source.Reply(_("Nickname \002%s\002 has been dropped."), nick.c_str()); } else diff --git a/modules/core/ns_forbid.cpp b/modules/core/ns_forbid.cpp index 15bd2ee7a..e6fbc89d3 100644 --- a/modules/core/ns_forbid.cpp +++ b/modules/core/ns_forbid.cpp @@ -74,9 +74,6 @@ class CommandNSForbid : public Command ircdproto->SendSQLine(&x); } - if (Config->WallForbid) - ircdproto->SendGlobops(NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick.c_str(), nick.c_str()); - Log(LOG_ADMIN, u, this) << "to forbid nick " << nick; source.Reply(_("Nick \002%s\002 is now forbidden."), nick.c_str()); diff --git a/modules/core/ns_getpass.cpp b/modules/core/ns_getpass.cpp index cd79512fb..a78e2eb95 100644 --- a/modules/core/ns_getpass.cpp +++ b/modules/core/ns_getpass.cpp @@ -34,8 +34,6 @@ class CommandNSGetPass : public Command if ((nr = findrequestnick(nick))) { Log(LOG_ADMIN, u, this) << "for " << nr->nick; - if (Config->WallGetpass) - ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str()); source.Reply(_("Passcode for %s is \002%s\002."), nick.c_str(), nr->passcode.c_str()); } else @@ -50,8 +48,6 @@ class CommandNSGetPass : public Command if (enc_decrypt(na->nc->pass, tmp_pass) == 1) { Log(LOG_ADMIN, u, this) << "for " << nick; - if (Config->WallGetpass) - ircdproto->SendGlobops(NickServ, "\2%s\2 used GETPASS on \2%s\2", u->nick.c_str(), nick.c_str()); source.Reply(_("Password for %s is \002%s\002."), nick.c_str(), tmp_pass.c_str()); } else diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp index a484e8b04..0aeab4d95 100644 --- a/modules/core/ns_saset.cpp +++ b/modules/core/ns_saset.cpp @@ -214,9 +214,6 @@ class CommandNSSASetPassword : public Command else source.Reply(LanguageString::NICK_SASET_PASSWORD_CHANGED, nc->display.c_str()); - if (Config->WallSetpass) - ircdproto->SendGlobops(NickServ, "\2%s\2 used SASET PASSWORD on \2%s\2", u->nick.c_str(), nc->display.c_str()); - return MOD_CONT; } diff --git a/modules/core/ns_suspend.cpp b/modules/core/ns_suspend.cpp index a4e7dc785..159ec0196 100644 --- a/modules/core/ns_suspend.cpp +++ b/modules/core/ns_suspend.cpp @@ -76,9 +76,6 @@ class CommandNSSuspend : public Command } } - if (Config->WallForbid) - ircdproto->SendGlobops(NickServ, "\2%s\2 used SUSPEND on \2%s\2", u->nick.c_str(), nick.c_str()); - Log(LOG_ADMIN, u, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << ")"; source.Reply(_("Nick %s is now suspended."), nick.c_str()); @@ -140,9 +137,6 @@ class CommandNSUnSuspend : public Command na->nc->UnsetFlag(NI_SUSPENDED); - if (Config->WallForbid) - ircdproto->SendGlobops(NickServ, "\2%s\2 used UNSUSPEND on \2%s\2", u->nick.c_str(), nick.c_str()); - Log(LOG_ADMIN, u, this) << "for " << na->nick; source.Reply(_("Nick %s is now released."), nick.c_str()); diff --git a/modules/core/os_akill.cpp b/modules/core/os_akill.cpp index 63c6c3700..b2396e360 100644 --- a/modules/core/os_akill.cpp +++ b/modules/core/os_akill.cpp @@ -195,38 +195,7 @@ class CommandOSAKill : public Command source.Reply(_("\002%s\002 added to the AKILL list."), mask.c_str()); - if (Config->WallOSAkill) - { - Anope::string buf; - - if (!expires) - buf = "does not expire"; - else - { - time_t wall_expiry = expires - Anope::CurTime; - Anope::string s; - - if (wall_expiry >= 86400) - { - wall_expiry /= 86400; - s = "day"; - } - else if (wall_expiry >= 3600) - { - wall_expiry /= 3600; - s = "hour"; - } - else if (wall_expiry >= 60) - { - wall_expiry /= 60; - s = "minute"; - } - - buf = "expires in " + stringify(wall_expiry) + " " + s + (wall_expiry == 1 ? "" : "s"); - } - - ircdproto->SendGlobops(OperServ, "%s added an AKILL for %s (%s) (%s) [affects %i user(s) (%.2f%%)]", u->nick.c_str(), mask.c_str(), reason.c_str(), buf.c_str(), affected, percent); - } + Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]"; if (readonly) source.Reply(LanguageString::READ_ONLY_MODE); diff --git a/modules/core/os_chankill.cpp b/modules/core/os_chankill.cpp index 6fa4fdeae..2d1ed23cd 100644 --- a/modules/core/os_chankill.cpp +++ b/modules/core/os_chankill.cpp @@ -77,8 +77,8 @@ class CommandOSChanKill : public Command SGLine->Add(OperServ, u, "*@" + uc->user->host, expires, realreason); SGLine->Check(uc->user); } - if (Config->WallOSAkill) - ircdproto->SendGlobops(OperServ, "%s used CHANKILL on %s (%s)", u->nick.c_str(), channel.c_str(), realreason.c_str()); + + Log(LOG_ADMIN, u, this) << "(" << realreason << ")"; } else source.Reply(LanguageString::CHAN_X_NOT_IN_USE, channel.c_str()); diff --git a/modules/core/os_global.cpp b/modules/core/os_global.cpp index 7803ec776..04584ed40 100644 --- a/modules/core/os_global.cpp +++ b/modules/core/os_global.cpp @@ -26,8 +26,7 @@ class CommandOSGlobal : public Command User *u = source.u; const Anope::string &msg = params[0]; - if (Config->WallOSGlobal) - ircdproto->SendGlobops(OperServ, "\2%s\2 just used GLOBAL command.", u->nick.c_str()); + Log(LOG_ADMIN, u, this); oper_global(u->nick, "%s", msg.c_str()); return MOD_CONT; } diff --git a/modules/core/os_jupe.cpp b/modules/core/os_jupe.cpp index 90f8e9821..c1ed47ec6 100644 --- a/modules/core/os_jupe.cpp +++ b/modules/core/os_jupe.cpp @@ -40,8 +40,7 @@ class CommandOSJupe : public Command Server *juped_server = new Server(Me, jserver, 1, rbuf, ircd->ts6 ? ts6_sid_retrieve() : "", SERVER_JUPED); ircdproto->SendServer(juped_server); - if (Config->WallOSJupe) - ircdproto->SendGlobops(OperServ, "\2%s\2 used JUPE on \2%s\2", u->nick.c_str(), jserver.c_str()); + Log(LOG_ADMIN, u, this) << "on " << jserver << " (" << rbuf << ")"; } return MOD_CONT; } diff --git a/modules/core/os_kick.cpp b/modules/core/os_kick.cpp index cf93ada17..a0f81acbe 100644 --- a/modules/core/os_kick.cpp +++ b/modules/core/os_kick.cpp @@ -47,8 +47,7 @@ class CommandOSKick : public Command } c->Kick(OperServ, u2, "%s (%s)", u->nick.c_str(), s.c_str()); - if (Config->WallOSKick) - ircdproto->SendGlobops(OperServ, "%s used KICK on %s/%s", u->nick.c_str(), u2->nick.c_str(), chan.c_str()); + Log(LOG_ADMIN, u, this) << "on " << u2->nick << " in " << c->name; return MOD_CONT; } diff --git a/modules/core/os_mode.cpp b/modules/core/os_mode.cpp index 3ded8a538..74c458704 100644 --- a/modules/core/os_mode.cpp +++ b/modules/core/os_mode.cpp @@ -38,8 +38,7 @@ class CommandOSMode : public Command { c->SetModes(OperServ, false, modes.c_str()); - if (Config->WallOSMode) - ircdproto->SendGlobops(OperServ, "\2%s\2 used MODE %s on %s", u->nick.c_str(), modes.c_str(), c->name.c_str()); + Log(LOG_ADMIN, u, this) << modes << " on " << target; } } else @@ -54,8 +53,7 @@ class CommandOSMode : public Command u2->SendMessage(OperServ, _("\002%s\002 changed your usermodes to %s."), u->nick.c_str(), modes.c_str()); - if (Config->WallOSMode) - ircdproto->SendGlobops(OperServ, "\2%s\2 used MODE %s %s", u->nick.c_str(), modes.c_str(), u2->nick.c_str()); + Log(LOG_ADMIN, u, this) << modes << " on " << target; } } diff --git a/modules/core/os_noop.cpp b/modules/core/os_noop.cpp index 18615b9c2..95fc7a360 100644 --- a/modules/core/os_noop.cpp +++ b/modules/core/os_noop.cpp @@ -35,8 +35,7 @@ class CommandOSNOOP : public Command ircdproto->SendSVSNOOP(server, 1); reason = "NOOP command used by " + u->nick; - if (Config->WallOSNoOp) - ircdproto->SendGlobops(OperServ, "\2%s\2 used NOOP on \2%s\2", u->nick.c_str(), server.c_str()); + Log(LOG_ADMIN, u, this) << "on " << server; source.Reply(_("All O:lines of \002%s\002 have been removed."), server.c_str()); /* Kill all the IRCops of the server */ diff --git a/modules/core/os_snline.cpp b/modules/core/os_snline.cpp index c36d8bf63..8a03c73a3 100644 --- a/modules/core/os_snline.cpp +++ b/modules/core/os_snline.cpp @@ -208,39 +208,7 @@ class CommandOSSNLine : public Command return MOD_CONT; source.Reply(_("\002%s\002 added to the SNLINE list."), mask.c_str()); - - if (Config->WallOSSNLine) - { - Anope::string buf; - - if (!expires) - buf = "does not expire"; - else - { - time_t wall_expiry = expires - Anope::CurTime; - Anope::string s; - - if (wall_expiry >= 86400) - { - wall_expiry /= 86400; - s = "day"; - } - else if (wall_expiry >= 3600) - { - wall_expiry /= 3600; - s = "hour"; - } - else if (wall_expiry >= 60) - { - wall_expiry /= 60; - s = "minute"; - } - - buf = "expires in " + stringify(wall_expiry) + " " + s + (wall_expiry == 1 ? "" : "s"); - } - - ircdproto->SendGlobops(findbot(Config->s_OperServ), "%s added an SNLINE for %s (%s) [affects %i user(s) (%.2f%%)]", u->nick.c_str(), mask.c_str(), buf.c_str(), affected, percent); - } + Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]"; if (readonly) source.Reply(LanguageString::READ_ONLY_MODE); diff --git a/modules/core/os_sqline.cpp b/modules/core/os_sqline.cpp index 16ff9bd12..544956dee 100644 --- a/modules/core/os_sqline.cpp +++ b/modules/core/os_sqline.cpp @@ -188,39 +188,7 @@ class CommandOSSQLine : public Command return MOD_CONT; source.Reply(_("\002%s\002 added to the SQLINE list."), mask.c_str()); - - if (Config->WallOSSQLine) - { - Anope::string buf; - - if (!expires) - buf = "does not expire"; - else - { - time_t wall_expiry = expires - Anope::CurTime; - Anope::string s; - - if (wall_expiry >= 86400) - { - wall_expiry /= 86400; - s = "day"; - } - else if (wall_expiry >= 3600) - { - wall_expiry /= 3600; - s = "hour"; - } - else if (wall_expiry >= 60) - { - wall_expiry /= 60; - s = "minute"; - } - - buf = "expires in " + stringify(wall_expiry) + " " + s + (wall_expiry == 1 ? "" : "s"); - } - - ircdproto->SendGlobops(OperServ, "%s added an SQLINE for %s (%s) [affects %i user(s) (%.2f%%)]", u->nick.c_str(), mask.c_str(), buf.c_str(), affected, percent); - } + Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]"; if (readonly) source.Reply(LanguageString::READ_ONLY_MODE); diff --git a/modules/core/os_szline.cpp b/modules/core/os_szline.cpp index 23ed98aa6..899ba69b7 100644 --- a/modules/core/os_szline.cpp +++ b/modules/core/os_szline.cpp @@ -192,39 +192,7 @@ class CommandOSSZLine : public Command return MOD_CONT; source.Reply(_("\002%s\002 added to the SZLINE list."), mask.c_str()); - - if (Config->WallOSSZLine) - { - Anope::string buf; - - if (!expires) - buf = "does not expire"; - else - { - time_t wall_expiry = expires - Anope::CurTime; - Anope::string s; - - if (wall_expiry >= 86400) - { - wall_expiry /= 86400; - s = "day"; - } - else if (wall_expiry >= 3600) - { - wall_expiry /= 3600; - s = "hour"; - } - else if (wall_expiry >= 60) - { - wall_expiry /= 60; - s = "minute"; - } - - buf = "expires in " + stringify(wall_expiry) + " " + s + (wall_expiry == 1 ? "" : "s"); - } - - ircdproto->SendGlobops(OperServ, "%s added an SZLINE for %s (%s) [affects %i user(s) (%.2f%%)]", u->nick.c_str(), mask.c_str(), buf.c_str(), affected, percent); - } + Log(LOG_ADMIN, u, this) << "on " << mask << " (" << reason << ") expires in " << duration(NULL, expires - Anope::CurTime) << " [affects " << affected << " user(s) (" << percent << "%)]"; if (readonly) source.Reply(LanguageString::READ_ONLY_MODE); |
