From 96befc58f073b4f96771b57d728b16742294c2fe Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 22 Dec 2020 03:53:00 +0000 Subject: Send RPL_SAVENICK from irc2 when renaming a user to their UUID. --- include/numerics.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/numerics.h b/include/numerics.h index fa694e214..a34d9b1e1 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -49,6 +49,7 @@ enum RPL_MAP = 15, // ircu RPL_ENDMAP = 17, // ircu RPL_MAPUSERS = 18, // insp-specific + RPL_SAVENICK = 43, // From irc2. RPL_STATS = 210, // From aircd. RPL_UMODEIS = 221, -- cgit v1.3.1-10-gc9f91 From 2c789b7c321a538f52c553bb7983f7215fe8532f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 23 Dec 2020 15:39:31 +0000 Subject: Fix core message events not being fired. Third time lucky eh? --- include/event.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/event.h b/include/event.h index b4b695d0e..d3b779216 100644 --- a/include/event.h +++ b/include/event.h @@ -184,7 +184,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE * FOREACH_MOD_CUSTOM(accountevprov, AccountEventListener, OnAccountChange, MOD_RESULT, (user, newaccount)) */ #define FOREACH_MOD_CUSTOM(prov, listenerclass, func, params) do { \ - if ((prov).GetModule() && !(prov).GetModule()->dying) \ + if (!(prov).GetModule() || !(prov).GetModule()->dying) \ { \ const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \ for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \ @@ -206,7 +206,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE */ #define FIRST_MOD_RESULT_CUSTOM(prov, listenerclass, func, result, params) do { \ result = MOD_RES_PASSTHRU; \ - if ((prov).GetModule() && !(prov).GetModule()->dying) \ + if (!(prov).GetModule() || !(prov).GetModule()->dying) \ { \ const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \ for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \ -- cgit v1.3.1-10-gc9f91 From 8d6b550e0b30983886dc240fd3261fae786d5693 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 7 Jan 2021 11:36:34 +0000 Subject: Implement support for more XML and IRC colour code escapes. --- include/configparser.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configparser.h b/include/configparser.h index 632679218..9fb66675f 100644 --- a/include/configparser.h +++ b/include/configparser.h @@ -33,9 +33,27 @@ struct ParseStack ParseStack(ServerConfig* conf) : output(conf->config_data), FilesOutput(conf->Files), errstr(conf->errstr) { - vars["amp"] = "&"; + // Special character escapes. + vars["newline"] = "\n"; + vars["nl"] = "\n"; + + // XML escapes. + vars["amp"] = "&"; + vars["apos"] = "'"; + vars["gt"] = ">"; + vars["lt"] = "<"; vars["quot"] = "\""; - vars["newline"] = vars["nl"] = "\n"; + + // IRC formatting codes. + vars["irc.bold"] = "\x02"; + vars["irc.color"] = "\x03"; + vars["irc.colour"] = "\x03"; + vars["irc.italic"] = "\x1D"; + vars["irc.monospace"] = "\x11"; + vars["irc.reset"] = "\x0F"; + vars["irc.reverse"] = "\x16"; + vars["irc.strikethrough"] = "\x1E"; + vars["irc.underline"] = "\x1F"; } bool ParseFile(const std::string& name, int flags, const std::string& mandatory_tag = std::string(), bool isexec = false); void DoInclude(ConfigTag* includeTag, int flags); -- cgit v1.3.1-10-gc9f91