]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Introduce "X" snomask for remote *:line messages [patch by jackmcbarn]
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 14 Sep 2009 17:09:16 +0000 (17:09 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 14 Sep 2009 17:09:16 +0000 (17:09 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11721 e03df62e-2008-0410-955e-edbf42e46eb7

17 files changed:
src/commands/cmd_eline.cpp
src/commands/cmd_gline.cpp
src/commands/cmd_kline.cpp
src/commands/cmd_nick.cpp
src/commands/cmd_qline.cpp
src/commands/cmd_zline.cpp
src/modules/m_cban.cpp
src/modules/m_connectban.cpp
src/modules/m_dnsbl.cpp
src/modules/m_permchannels.cpp
src/modules/m_rline.cpp
src/modules/m_shun.cpp
src/modules/m_spanningtree/addline.cpp
src/modules/m_spanningtree/delline.cpp
src/modules/m_svshold.cpp
src/modules/m_xline_db.cpp
src/snomasks.cpp

index 1294f1dbbd2c9ff78a1717ea16de04be4254bc73..7845fa2f1151d04223a5074a8b877d3574a0273c 100644 (file)
@@ -111,7 +111,7 @@ CmdResult CommandEline::Handle (const std::vector<std::string>& 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
                {
index cc29954d5153dd772f185747851d937ac6cfac8d..ad30674285a70f51c8da1e7471e0cef9fa047189 100644 (file)
@@ -97,7 +97,7 @@ CmdResult CommandGline::Handle (const std::vector<std::string>& 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
                {
index ecc2aca5c27479b251ffd65c2d09086b9cc6d0de..3ec2461b4f3b93ddf73146d14aec21efae6e19b2 100644 (file)
@@ -96,7 +96,7 @@ CmdResult CommandKline::Handle (const std::vector<std::string>& 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
                {
index a447f7d7090aac2b9b762f12b9bd8ab6a0ca2c2b..99b8348abff8d3431c48632dea767dca2f84d3cc 100644 (file)
@@ -111,7 +111,7 @@ CmdResult CommandNick::Handle (const std::vector<std::string>& 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());
index 97e219f9b53d4b63a0c9400bdcd1028af8b3edc9..ffe8c5ee62ec9c43afbf02c1bd45d78cbdec9468 100644 (file)
@@ -23,7 +23,7 @@ class CommandQline : public Command
        CommandQline ( Module* parent) : Command(parent,"QLINE",1,3) { flags_needed = 'o'; Penalty = 0; syntax = "<nick> [<duration> :<reason>]"; }
        /** 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<std::string>& 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
                {
index e2b470805fa2a694b3a446c5636788505331f892..e2cca76497e2ebde8c41c9c6631a1b1534b49258 100644 (file)
@@ -91,7 +91,7 @@ CmdResult CommandZline::Handle (const std::vector<std::string>& 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
                {
index d5e62c98b09289c710a313c3c5cb743b4c8812a0..0181cb2fe9f0b6997252c3f1bf5b5ed95eba6a2e 100644 (file)
@@ -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();
index ae464a16cc3430b17673aa4e13986d85088a4616..4d5011575691aeadc630fe099539a7753134f4a0 100644 (file)
@@ -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);
                        }
                }
index a2964a0bd036e6d79dea66df57df56a154085438..8ce1ce37c4b26617b38d2ddaefea5d0764f71d27 100644 (file)
@@ -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();
                                                        }
index 674a6dca54ffc826ce7fd4cbf66443024afdbe61..e27b2cf9c4239152e3a9be63d36035148e10bf1a 100644 (file)
@@ -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;
        }
 
index f3f27a9fbe1c910187de194cf5197cb96113fa9f..3b8aacb3fa9bd8b8ac85048ad0928c8b447d578b 100644 (file)
@@ -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;
                        }
                }
index 193c39349fa3f28c6f237ded0cd45d8dbfa4940f..c3cd3a80d2641b552bdde681897af294bb110ff9 100644 (file)
@@ -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());
                                        }
 
index fe7ef684511b919433bb6c1ca5673dc80ccc66d0..2f7b5132d84dc30f38d99ca9cb010e14d9965d17 100644 (file)
@@ -24,7 +24,7 @@ bool TreeSocket::AddLine(const std::string &prefix, parameterlist &params)
 {
        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 &params)
 
        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 &params)
        }
        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 &params)
        {
                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];
index 5b01e3e983ff28cb5ee111c9fb1b3e9efb743201..a1a9089ad6114772faaf88168a9fdd21e611b59b 100644 (file)
@@ -42,8 +42,8 @@ bool TreeSocket::DelLine(const std::string &prefix, parameterlist &params)
        /* 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;
index cbe980d058721925f63d6ac923ab57f047a9f2fa..e75f1d150be4234f4e9a95facfcb8105f05ebc78 100644 (file)
@@ -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
index bde54a110a22c951c4d762d2d004f4e84a8c0918..56bf7c8ef9106ab57739e91676f8dde528a9bb4b 100644 (file)
@@ -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;
                                }
 
index 889457ade88ba82e5cff1fbbff4f7c1a503bf1e0..863b9f2db53eaf0e57a647cff9f59303d664cd73 100644 (file)
@@ -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 */
 }