From 63d3e056b742598f48ba9a8df216b06117a37910 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 14 Sep 2009 17:09:16 +0000 Subject: Introduce "X" snomask for remote *:line messages [patch by jackmcbarn] git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11721 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_eline.cpp | 2 +- src/commands/cmd_gline.cpp | 2 +- src/commands/cmd_kline.cpp | 2 +- src/commands/cmd_nick.cpp | 2 +- src/commands/cmd_qline.cpp | 4 ++-- src/commands/cmd_zline.cpp | 2 +- src/modules/m_cban.cpp | 10 +++------- src/modules/m_connectban.cpp | 4 +++- src/modules/m_dnsbl.cpp | 6 +++--- src/modules/m_permchannels.cpp | 4 ++-- src/modules/m_rline.cpp | 18 +++++++++--------- src/modules/m_shun.cpp | 6 +++--- src/modules/m_spanningtree/addline.cpp | 10 +++++----- src/modules/m_spanningtree/delline.cpp | 4 ++-- src/modules/m_svshold.cpp | 12 +++++++++++- src/modules/m_xline_db.cpp | 12 ++++++------ src/snomasks.cpp | 1 + 17 files changed, 55 insertions(+), 46 deletions(-) diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp index 1294f1dbb..7845fa2f1 100644 --- a/src/commands/cmd_eline.cpp +++ b/src/commands/cmd_eline.cpp @@ -111,7 +111,7 @@ CmdResult CommandEline::Handle (const std::vector& parameters, User { if (ServerInstance->XLines->DelLine(target.c_str(), "E", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed E-line on %s.",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed E-line on %s",user->nick.c_str(),target.c_str()); } else { diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp index cc29954d5..ad3067428 100644 --- a/src/commands/cmd_gline.cpp +++ b/src/commands/cmd_gline.cpp @@ -97,7 +97,7 @@ CmdResult CommandGline::Handle (const std::vector& parameters, User { if (ServerInstance->XLines->DelLine(target.c_str(),"G",user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed G-line on %s.",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed G-line on %s",user->nick.c_str(),target.c_str()); } else { diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp index ecc2aca5c..3ec2461b4 100644 --- a/src/commands/cmd_kline.cpp +++ b/src/commands/cmd_kline.cpp @@ -96,7 +96,7 @@ CmdResult CommandKline::Handle (const std::vector& parameters, User { if (ServerInstance->XLines->DelLine(target.c_str(),"K",user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed K-line on %s.",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed K-line on %s",user->nick.c_str(),target.c_str()); } else { diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp index a447f7d70..99b8348ab 100644 --- a/src/commands/cmd_nick.cpp +++ b/src/commands/cmd_nick.cpp @@ -111,7 +111,7 @@ CmdResult CommandNick::Handle (const std::vector& parameters, User { if (user->registered == REG_ALL) { - ServerInstance->SNO->WriteToSnoMask('x', "Q-Lined nickname %s from %s!%s@%s: %s", + ServerInstance->SNO->WriteGlobalSno('a', "Q-Lined nickname %s from %s!%s@%s: %s", parameters[0].c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str(), mq->reason.c_str()); } user->WriteNumeric(432, "%s %s :Invalid nickname: %s",user->nick.c_str(), parameters[0].c_str(), mq->reason.c_str()); diff --git a/src/commands/cmd_qline.cpp b/src/commands/cmd_qline.cpp index 97e219f9b..ffe8c5ee6 100644 --- a/src/commands/cmd_qline.cpp +++ b/src/commands/cmd_qline.cpp @@ -23,7 +23,7 @@ class CommandQline : public Command CommandQline ( Module* parent) : Command(parent,"QLINE",1,3) { flags_needed = 'o'; Penalty = 0; syntax = " [ :]"; } /** Handle command. * @param parameters The parameters to the comamnd - * @param pcnt The number of parameters passed to teh command + * @param pcnt The number of parameters passed to the command * @param user The user issuing the command * @return A value from CmdResult to indicate command success or failure. */ @@ -70,7 +70,7 @@ CmdResult CommandQline::Handle (const std::vector& parameters, User { if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "Q", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed Q-line on %s.",user->nick.c_str(),parameters[0].c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed Q-line on %s",user->nick.c_str(),parameters[0].c_str()); } else { diff --git a/src/commands/cmd_zline.cpp b/src/commands/cmd_zline.cpp index e2b470805..e2cca7649 100644 --- a/src/commands/cmd_zline.cpp +++ b/src/commands/cmd_zline.cpp @@ -91,7 +91,7 @@ CmdResult CommandZline::Handle (const std::vector& parameters, User { if (ServerInstance->XLines->DelLine(target.c_str(),"Z",user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed Z-line on %s.",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed Z-line on %s",user->nick.c_str(),target.c_str()); } else { diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index d5e62c98b..0181cb2fe 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -50,7 +50,6 @@ public: { ServerInstance->SNO->WriteToSnoMask('x',"Removing expired CBan %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source.c_str(), (long int)(ServerInstance->Time() - this->set_time)); - ServerInstance->PI->SendSNONotice("x", "Removing expired CBan " + assign(this->matchtext) + " (set by " + this->source + " " + ConvToStr(ServerInstance->Time() - this->set_time) + " seconds ago)"); } const char* Displayable() @@ -99,8 +98,7 @@ class CommandCBan : public Command { if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "CBAN", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s removed CBan on %s.",user->nick.c_str(),parameters[0].c_str()); - ServerInstance->PI->SendSNONotice("x", user->nick + " removed CBan on " + parameters[0]); + ServerInstance->SNO->WriteGlobalSno('x', "%s removed CBan on %s.",user->nick.c_str(),parameters[0].c_str()); } else { @@ -131,14 +129,12 @@ class CommandCBan : public Command { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent CBan for %s: %s", user->nick.c_str(), parameters[0].c_str(), reason); - ServerInstance->PI->SendSNONotice("x", user->nick + " added permenant CBan for " + parameters[0] + ": " + std::string(reason)); + ServerInstance->SNO->WriteGlobalSno('x', "%s added permanent CBan for %s: %s", user->nick.c_str(), parameters[0].c_str(), reason); } else { time_t c_requires_crap = duration + ServerInstance->Time(); - ServerInstance->SNO->WriteToSnoMask('x', "%s added timed CBan for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), reason); - ServerInstance->PI->SendSNONotice("x", user->nick + " added timed CBan for " + parameters[0] + ", expires on " + ServerInstance->TimeString(c_requires_crap) + ": " + std::string(reason)); + ServerInstance->SNO->WriteGlobalSno('x', "%s added timed CBan for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), reason); } ServerInstance->XLines->ApplyLines(); diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index ae464a16c..4d5011575 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -97,7 +97,9 @@ class ModuleConnectBan : public Module else delete zl; - ServerInstance->SNO->WriteToSnoMask('x', "Connect flooding from IP range %s (%d)", u->GetCIDRMask(range), threshold); + ServerInstance->SNO->WriteGlobalSno('x',"Module m_connectban added Z:line on *@%s to expire on %s: Connect flooding", + u->GetCIDRMask(range), ServerInstance->TimeString(zl->expiry).c_str()); + ServerInstance->SNO->WriteGlobalSno('a', "Connect flooding from IP range %s (%d)", u->GetCIDRMask(range), threshold); connects.erase(i); } } diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index a2964a0bd..8ce1ce37c 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -129,7 +129,7 @@ class DNSBLResolver : public Resolver "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(kl,NULL)) { - ServerInstance->SNO->WriteToSnoMask('x',"m_dnsbl added K:line on *@%s to expire on %s (%s).", + ServerInstance->SNO->WriteGlobalSno('x',"K:line added due to DNSBL match on *@%s to expire on %s: %s", them->GetIPString(), ServerInstance->TimeString(kl->expiry).c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } @@ -143,7 +143,7 @@ class DNSBLResolver : public Resolver "*", them->GetIPString()); if (ServerInstance->XLines->AddLine(gl,NULL)) { - ServerInstance->SNO->WriteToSnoMask('x',"m_dnsbl added G:line on *@%s to expire on %s (%s).", + ServerInstance->SNO->WriteGlobalSno('x',"G:line added due to DNSBL match on *@%s to expire on %s: %s", them->GetIPString(), ServerInstance->TimeString(gl->expiry).c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } @@ -157,7 +157,7 @@ class DNSBLResolver : public Resolver them->GetIPString()); if (ServerInstance->XLines->AddLine(zl,NULL)) { - ServerInstance->SNO->WriteToSnoMask('x',"m_dnsbl added Z:line on *@%s to expire on %s (%s).", + ServerInstance->SNO->WriteGlobalSno('x',"Z:line added due to DNSBL match on *@%s to expire on %s: %s", them->GetIPString(), ServerInstance->TimeString(zl->expiry).c_str(), reason.c_str()); ServerInstance->XLines->ApplyLines(); } diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 674a6dca5..e27b2cf9c 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -61,7 +61,7 @@ static bool WriteDatabase() if (write_error) { ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot write to new database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot write to new db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno); return false; } @@ -69,7 +69,7 @@ static bool WriteDatabase() if (rename(tempname.c_str(), permchannelsconf.c_str()) < 0) { ServerInstance->Logs->Log("m_permchannels",DEFAULT, "permchannels: Cannot move new to old database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno); return false; } diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index f3f27a9fb..3b8aacb3f 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -39,7 +39,7 @@ class RLine : public XLine if (!rxengine) { - ServerInstance->SNO->WriteToSnoMask('x', "Cannot create regexes until engine is set to a loaded provider!"); + ServerInstance->SNO->WriteToSnoMask('a', "Cannot create regexes until engine is set to a loaded provider!"); throw ModuleException("Regex engine not set or loaded!"); } @@ -77,7 +77,7 @@ class RLine : public XLine void DisplayExpiry() { - ServerInstance->SNO->WriteToSnoMask('x',"Removing expired R-Line %s (set by %s %ld seconds ago)", + ServerInstance->SNO->WriteToSnoMask('x',"Removing expired R-line %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source.c_str(), (long int)(ServerInstance->Time() - this->set_time)); } @@ -142,7 +142,7 @@ class CommandRLine : public Command } catch (ModuleException &e) { - ServerInstance->SNO->WriteToSnoMask('x',"Could not add RLINE: %s", e.GetReason()); + ServerInstance->SNO->WriteToSnoMask('a',"Could not add RLINE: %s", e.GetReason()); } if (r) @@ -151,12 +151,12 @@ class CommandRLine : public Command { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent R-Line for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent R-line for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); } else { time_t c_requires_crap = duration + ServerInstance->Time(); - ServerInstance->SNO->WriteToSnoMask('x', "%s added timed R-Line for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), parameters[2].c_str()); + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed R-line for %s to expire on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), parameters[2].c_str()); } ServerInstance->XLines->ApplyLines(); @@ -172,7 +172,7 @@ class CommandRLine : public Command { if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "R", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed R-Line on %s.",user->nick.c_str(),parameters[0].c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed R-line on %s",user->nick.c_str(),parameters[0].c_str()); } else { @@ -261,14 +261,14 @@ class ModuleRLine : public Module { if (RegexNameRequest(this, *i).Send() == newrxengine) { - ServerInstance->SNO->WriteToSnoMask('x', "R-Line now using engine '%s'", RegexEngine.c_str()); + ServerInstance->SNO->WriteToSnoMask('a', "R-Line now using engine '%s'", RegexEngine.c_str()); rxengine = *i; } } } if (!rxengine) { - ServerInstance->SNO->WriteToSnoMask('x', "WARNING: Regex engine '%s' is not loaded - R-Line functionality disabled until this is corrected.", RegexEngine.c_str()); + ServerInstance->SNO->WriteToSnoMask('a', "WARNING: Regex engine '%s' is not loaded - R-Line functionality disabled until this is corrected.", RegexEngine.c_str()); } } @@ -288,7 +288,7 @@ class ModuleRLine : public Module std::string rxname = RegexNameRequest(this, mod).Send(); if (rxname == RegexEngine) { - ServerInstance->SNO->WriteToSnoMask('x', "R-Line now using engine '%s'", RegexEngine.c_str()); + ServerInstance->SNO->WriteToSnoMask('a', "R-Line now using engine '%s'", RegexEngine.c_str()); rxengine = mod; } } diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 193c39349..c3cd3a80d 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -107,7 +107,7 @@ class CommandShun : public Command { if (ServerInstance->XLines->DelLine(target.c_str(), "SHUN", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed shun on %s.",user->nick.c_str(),target.c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed SHUN on %s",user->nick.c_str(),target.c_str()); } else { @@ -149,13 +149,13 @@ class CommandShun : public Command { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent shun for %s: %s", + ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent SHUN for %s: %s", user->nick.c_str(), target.c_str(), expr.c_str()); } else { time_t c_requires_crap = duration + ServerInstance->Time(); - ServerInstance->SNO->WriteToSnoMask('x', "%s added timed shun for %s, expires on %s: %s", + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed SHUN for %s to expire on %s: %s", user->nick.c_str(), target.c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), expr.c_str()); } diff --git a/src/modules/m_spanningtree/addline.cpp b/src/modules/m_spanningtree/addline.cpp index fe7ef6845..2f7b5132d 100644 --- a/src/modules/m_spanningtree/addline.cpp +++ b/src/modules/m_spanningtree/addline.cpp @@ -24,7 +24,7 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist ¶ms) { if (params.size() < 6) { - this->ServerInstance->SNO->WriteToSnoMask('x',"%s sent me a malformed ADDLINE of type %s.",prefix.c_str(),params[0].c_str()); + this->ServerInstance->SNO->WriteToSnoMask('d',"%s sent me a malformed ADDLINE of type %s.",prefix.c_str(),params[0].c_str()); return true; } @@ -43,7 +43,7 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist ¶ms) if (!xlf) { - this->ServerInstance->SNO->WriteToSnoMask('x',"%s sent me an unknown ADDLINE type (%s).",setter.c_str(),params[0].c_str()); + this->ServerInstance->SNO->WriteToSnoMask('d',"%s sent me an unknown ADDLINE type (%s).",setter.c_str(),params[0].c_str()); return true; } @@ -54,7 +54,7 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist ¶ms) } catch (ModuleException &e) { - this->ServerInstance->SNO->WriteToSnoMask('x',"Unable to ADDLINE type %s from %s: %s", params[0].c_str(), setter.c_str(), e.GetReason()); + this->ServerInstance->SNO->WriteToSnoMask('d',"Unable to ADDLINE type %s from %s: %s", params[0].c_str(), setter.c_str(), e.GetReason()); return true; } xl->SetCreateTime(atoi(params[3].c_str())); @@ -62,12 +62,12 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist ¶ms) { if (xl->duration) { - this->ServerInstance->SNO->WriteToSnoMask('x',"%s added %s%s on %s to expire on %s (%s).",setter.c_str(),params[0].c_str(),params[0].length() == 1 ? "LINE" : "", + this->ServerInstance->SNO->WriteToSnoMask('X',"%s added %s%s on %s to expire on %s: %s",setter.c_str(),params[0].c_str(),params[0].length() == 1 ? "-line" : "", params[1].c_str(),ServerInstance->TimeString(xl->expiry).c_str(),params[5].c_str()); } else { - this->ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent %s%s on %s (%s).",setter.c_str(),params[0].c_str(),params[0].length() == 1 ? "LINE" : "", + this->ServerInstance->SNO->WriteToSnoMask('X',"%s added permanent %s%s on %s: %s",setter.c_str(),params[0].c_str(),params[0].length() == 1 ? "-line" : "", params[1].c_str(),params[5].c_str()); } params[5] = ":" + params[5]; diff --git a/src/modules/m_spanningtree/delline.cpp b/src/modules/m_spanningtree/delline.cpp index 5b01e3e98..a1a9089ad 100644 --- a/src/modules/m_spanningtree/delline.cpp +++ b/src/modules/m_spanningtree/delline.cpp @@ -42,8 +42,8 @@ bool TreeSocket::DelLine(const std::string &prefix, parameterlist ¶ms) /* NOTE: No check needed on 'user', this function safely handles NULL */ if (ServerInstance->XLines->DelLine(params[1].c_str(), params[0], user)) { - this->ServerInstance->SNO->WriteToSnoMask('x',"%s removed %s%s on %s.", setter.c_str(), - params[0].c_str(), params[0].length() == 1 ? "LINE" : "", params[1].c_str()); + this->ServerInstance->SNO->WriteToSnoMask('X',"%s removed %s%s on %s", setter.c_str(), + params[0].c_str(), params[0].length() == 1 ? "-line" : "", params[1].c_str()); Utils->DoOneToAllButSender(prefix,"DELLINE", params, prefix); } return true; diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index cbe980d05..e75f1d150 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -100,7 +100,7 @@ class CommandSvshold : public Command { if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "SVSHOLD", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed SVSHOLD on %s.",user->nick.c_str(),parameters[0].c_str()); + ServerInstance->SNO->WriteToSnoMask('x',"%s removed SVSHOLD on %s",user->nick.c_str(),parameters[0].c_str()); } else { @@ -128,6 +128,16 @@ class CommandSvshold : public Command { if (ServerInstance->XLines->AddLine(r, user)) { + if (!duration) + { + ServerInstance->SNO->WriteGlobalSno('x', "%s added permanent SVSHOLD for %s: %s", user->nick.c_str(), parameters[0].c_str(), parameters[2].c_str()); + } + else + { + time_t c_requires_crap = duration + ServerInstance->Time(); + ServerInstance->SNO->WriteGlobalSno('x', "%s added timed SVSHOLD for %s, expires on %s: %s", user->nick.c_str(), parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str(), parameters[2].c_str()); + } + ServerInstance->XLines->ApplyLines(); } else diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index bde54a110..56bf7c8ef 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -97,7 +97,7 @@ class ModuleXLineDB : public Module if (!f) { ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot create database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot create new db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot create new db: %s (%d)", strerror(errno), errno); return false; } @@ -129,7 +129,7 @@ class ModuleXLineDB : public Module if (write_error) { ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot write to new database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot write to new db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot write to new db: %s (%d)", strerror(errno), errno); return false; } @@ -137,7 +137,7 @@ class ModuleXLineDB : public Module if (rename("xline.db.new", "xline.db") < 0) { ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot move new to old database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot replace old with new db: %s (%d)", strerror(errno), errno); return false; } @@ -162,7 +162,7 @@ class ModuleXLineDB : public Module { /* this might be slightly more problematic. */ ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: Cannot read database! %s (%d)", strerror(errno), errno); - ServerInstance->SNO->WriteToSnoMask('x', "database: cannot read db: %s (%d)", strerror(errno), errno); + ServerInstance->SNO->WriteToSnoMask('a', "database: cannot read db: %s (%d)", strerror(errno), errno); return false; } } @@ -207,7 +207,7 @@ class ModuleXLineDB : public Module { fclose(f); ServerInstance->Logs->Log("m_xline_db",DEBUG, "xlinedb: I got database version %s - I don't understand it", command_p[1].c_str()); - ServerInstance->SNO->WriteToSnoMask('x', "database: I got a database version (%s) I don't understand", command_p[1].c_str()); + ServerInstance->SNO->WriteToSnoMask('a', "database: I got a database version (%s) I don't understand", command_p[1].c_str()); return false; } } @@ -218,7 +218,7 @@ class ModuleXLineDB : public Module if (!xlf) { - ServerInstance->SNO->WriteToSnoMask('x', "database: Unknown line type (%s).", command_p[1].c_str()); + ServerInstance->SNO->WriteToSnoMask('a', "database: Unknown line type (%s).", command_p[1].c_str()); continue; } diff --git a/src/snomasks.cpp b/src/snomasks.cpp index 889457ade..863b9f2db 100644 --- a/src/snomasks.cpp +++ b/src/snomasks.cpp @@ -125,6 +125,7 @@ void SnomaskManager::SetupDefaults() this->EnableSnomask('A',"REMOTEANNOUNCEMENT"); /* formerly WriteOpers() - generic notices to all opers */ this->EnableSnomask('d',"DEBUG"); /* Debug notices */ this->EnableSnomask('x',"XLINE"); /* Xline notice (g/z/q/k/e) */ + this->EnableSnomask('X',"REMOTEXLINE"); /* Remove Xline notice (g/z/q/k/e) */ this->EnableSnomask('t',"STATS"); /* Local or remote stats request */ this->EnableSnomask('f',"FLOOD"); /* Flooding notices */ } -- cgit v1.2.3