From d3a7ac87cb9ef8687f7fec09f54a570f9858efb4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 5 Feb 2021 23:34:14 +0000 Subject: Show the name of the WebIRC gateway in the IP changing notice. --- src/modules/m_cgiirc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index da89b33eb..8bf60bc50 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -173,8 +173,9 @@ class CommandWebIRC : public SplitCommand realhost.set(user, user->GetRealHost()); realip.set(user, user->GetIPString()); - WriteLog("Connecting user %s is using a WebIRC gateway; changing their IP from %s to %s.", - user->uuid.c_str(), user->GetIPString().c_str(), parameters[3].c_str()); + WriteLog("Connecting user %s is using the %s WebIRC gateway; changing their IP from %s to %s.", + user->uuid.c_str(), parameters[1].c_str(), + user->GetIPString().c_str(), parameters[3].c_str()); // If we have custom flags then deal with them. WebIRC::FlagMap flags; -- cgit v1.3.1-10-gc9f91 From ee23dd450ed713d907d0ecdeec356971439d4356 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 10 Feb 2021 23:59:27 +0000 Subject: Move linuxdaemon and Sheogorath to former contributors. --- src/coremods/core_info/cmd_info.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/coremods/core_info/cmd_info.cpp b/src/coremods/core_info/cmd_info.cpp index 32112ca7e..61aea6bc6 100644 --- a/src/coremods/core_info/cmd_info.cpp +++ b/src/coremods/core_info/cmd_info.cpp @@ -57,7 +57,7 @@ static const char* const lines[] = { " Robin Burchell, w00t, ", " ", "\002Active Contributors\002:", - " Adam linuxdaemon Robby Sheogorath", + " Adam Robby", " ", "\002Former Contributors\002:", " Adremelech Ankit AnMaster Bricker", @@ -65,16 +65,17 @@ static const char* const lines[] = { " Dan djGrrr dmb eggy", " GreenReaper HiroP jackmcbarn jamie", " Jason jilles John2 kaniini", - " LeaChim MacGyver Majic Namegduf", - " owine Phoenix pippijn praetorian", - " Quension satmd Shawn Shutter", - " skenmy Skip Stskeeps Taros", - " ThaPrince Thunderhacker typobox43 Zaba", + " LeaChim linuxdaemon MacGyver majic", + " Namegduf owine Phoenix pippijn", + " praetorian Quension satmd Shawn", + " Sheogorath Shutter skenmy Skip", + " Stskeeps Taros ThaPrince Thunderhacker", + " typobox43 Zaba", " ", "\002Thanks To\002:", " Asmo Brik fraggeln prawnsalad", " ", - " Best experienced with: \002An IRC client\002", + " Best experienced with \002an IRC client\002", NULL }; -- cgit v1.3.1-10-gc9f91 From fa0256cc807bbc6ee825d2cea2ec1adde6913fe3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 18 Feb 2021 00:42:32 +0000 Subject: Fix the message sent when SSL profiles are rehashed. --- src/modules/extra/m_ssl_gnutls.cpp | 2 +- src/modules/extra/m_ssl_mbedtls.cpp | 2 +- src/modules/extra/m_ssl_openssl.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index f79fa43de..de8edb428 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -1381,7 +1381,7 @@ class ModuleSSLGnuTLS : public Module try { ReadProfiles(); - ServerInstance->SNO->WriteToSnoMask('a', "TLS (SSL) module GnuTLS rehashed."); + ServerInstance->SNO->WriteToSnoMask('a', "GnuTLS TLS (SSL) profiles have been reloaded."); } catch (ModuleException& ex) { diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index ecf4e660a..a787ba993 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -951,7 +951,7 @@ class ModuleSSLmbedTLS : public Module try { ReadProfiles(); - ServerInstance->SNO->WriteToSnoMask('a', "TLS (SSL) module mbedTLS rehashed."); + ServerInstance->SNO->WriteToSnoMask('a', "mbedTLS TLS (SSL) profiles have been reloaded."); } catch (ModuleException& ex) { diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index a9588d7b4..b34eda6bf 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -1075,7 +1075,7 @@ class ModuleSSLOpenSSL : public Module try { ReadProfiles(); - ServerInstance->SNO->WriteToSnoMask('a', "TLS (SSL) module OpenSSL rehashed."); + ServerInstance->SNO->WriteToSnoMask('a', "OpenSSL TLS (SSL) profiles have been reloaded."); } catch (ModuleException& ex) { -- cgit v1.3.1-10-gc9f91 From 67215adc97f70b86300833ce891b47ba8fadd92c Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 18 Feb 2021 04:10:14 +0000 Subject: Fix the numeric sent when a U-lined alias target is not online. --- include/numerics.h | 1 + src/coremods/core_message.cpp | 5 ----- src/modules/m_alias.cpp | 5 +++-- 3 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/include/numerics.h b/include/numerics.h index a34d9b1e1..98abf2bbe 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -113,6 +113,7 @@ enum ERR_CANNOTSENDTOCHAN = 404, ERR_TOOMANYCHANNELS = 405, ERR_WASNOSUCHNICK = 406, + ERR_NOSUCHSERVICE = 408, // From RFC 2812. ERR_NOTEXTTOSEND = 412, ERR_UNKNOWNCOMMAND = 421, ERR_NOMOTD = 422, diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 26573c8bf..75abd6900 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -24,11 +24,6 @@ #include "inspircd.h" -enum -{ - // From RFC 2812. - ERR_NOSUCHSERVICE = 408 -}; class MessageDetailsImpl : public MessageDetails { diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index df7add05c..478bfb3d9 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -286,17 +286,18 @@ class ModuleAlias : public Module if (!a->RequiredNick.empty()) { + int numeric = a->ULineOnly ? ERR_NOSUCHSERVICE : ERR_NOSUCHNICK; User* u = ServerInstance->FindNickOnly(a->RequiredNick); if (!u) { - user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick, "is currently unavailable. Please try again later."); + user->WriteNumeric(numeric, a->RequiredNick, "is currently unavailable. Please try again later."); return 1; } if ((a->ULineOnly) && (!u->server->IsULine())) { ServerInstance->SNO->WriteToSnoMask('a', "NOTICE -- Service "+a->RequiredNick+" required by alias "+a->AliasedCommand+" is not on a U-lined server, possibly underhanded antics detected!"); - user->WriteNumeric(ERR_NOSUCHNICK, a->RequiredNick, "is not a network service! Please inform a server operator as soon as possible."); + user->WriteNumeric(numeric, a->RequiredNick, "is not a network service! Please inform a server operator as soon as possible."); return 1; } } -- cgit v1.3.1-10-gc9f91 From a234653c7e61653bc1b7cf2755fafba1d5288934 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 21 Feb 2021 01:04:57 +0000 Subject: Rename the cmd variable to cmdwebirc in the cgiirc module. --- src/modules/m_cgiirc.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 8bf60bc50..107824985 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -236,7 +236,7 @@ class ModuleCgiIRC , public Whois::EventListener { private: - CommandWebIRC cmd; + CommandWebIRC cmdwebirc; std::vector hosts; static bool ParseIdent(LocalUser* user, irc::sockets::sockaddrs& out) @@ -279,7 +279,7 @@ class ModuleCgiIRC ModuleCgiIRC() : WebIRC::EventListener(this) , Whois::EventListener(this) - , cmd(this) + , cmdwebirc(this) { } @@ -342,10 +342,10 @@ class ModuleCgiIRC // The host configuration was valid so we can apply it. hosts.swap(identhosts); - cmd.hosts.swap(webirchosts); + cmdwebirc.hosts.swap(webirchosts); // Do we send an oper notice when a m_cgiirc client has their IP changed? - cmd.notify = ServerInstance->Config->ConfValue("cgiirc")->getBool("opernotice", true); + cmdwebirc.notify = ServerInstance->Config->ConfValue("cgiirc")->getBool("opernotice", true); } ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass) CXX11_OVERRIDE @@ -357,7 +357,7 @@ class ModuleCgiIRC // If the user is not connecting via a WebIRC gateway then they // cannot match this connect class. - const std::string* gateway = cmd.gateway.get(user); + const std::string* gateway = cmdwebirc.gateway.get(user); if (!gateway) { ServerInstance->Logs->Log("CONNECTCLASS", LOG_DEBUG, "The %s connect class is not suitable as it requires a connection via a WebIRC gateway", @@ -380,7 +380,7 @@ class ModuleCgiIRC ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE { // There is no need to check for gateways if one is already being used. - if (cmd.realhost.get(user)) + if (cmdwebirc.realhost.get(user)) return MOD_RES_PASSTHRU; for (std::vector::const_iterator iter = hosts.begin(); iter != hosts.end(); ++iter) @@ -396,11 +396,11 @@ class ModuleCgiIRC return MOD_RES_PASSTHRU; // Store the hostname and IP of the gateway for later use. - cmd.realhost.set(user, user->GetRealHost()); - cmd.realip.set(user, user->GetIPString()); + cmdwebirc.realhost.set(user, user->GetRealHost()); + cmdwebirc.realip.set(user, user->GetIPString()); const std::string& newident = iter->GetIdent(); - cmd.WriteLog("Connecting user %s is using an ident gateway; changing their IP from %s to %s and their ident from %s to %s.", + cmdwebirc.WriteLog("Connecting user %s is using an ident gateway; changing their IP from %s to %s and their ident from %s to %s.", user->uuid.c_str(), user->GetIPString().c_str(), address.addr().c_str(), user->ident.c_str(), newident.c_str()); user->ChangeIdent(newident); @@ -476,12 +476,12 @@ class ModuleCgiIRC return; // If these fields are not set then the client is not using a gateway. - const std::string* realhost = cmd.realhost.get(whois.GetTarget()); - const std::string* realip = cmd.realip.get(whois.GetTarget()); + const std::string* realhost = cmdwebirc.realhost.get(whois.GetTarget()); + const std::string* realip = cmdwebirc.realip.get(whois.GetTarget()); if (!realhost || !realip) return; - const std::string* gateway = cmd.gateway.get(whois.GetTarget()); + const std::string* gateway = cmdwebirc.gateway.get(whois.GetTarget()); if (gateway) whois.SendLine(RPL_WHOISGATEWAY, *realhost, *realip, "is connected via the " + *gateway + " WebIRC gateway"); else -- cgit v1.3.1-10-gc9f91 From b45b7f018d49eeeada7ece3d05382798bbcd55e4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 21 Feb 2021 01:59:44 +0000 Subject: Add a command to the cgiirc module for encoding/decoding hex idents. --- docs/conf/helpop.conf.example | 23 +++++--- src/modules/m_cgiirc.cpp | 118 +++++++++++++++++++++++++++++------------- 2 files changed, 96 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index df886608d..a2a09fa87 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -32,14 +32,14 @@ parameter for this command. + + WriteNotice("*** HEXIP: You can only hex encode an IPv4 address!"); + return CMD_FAILURE; + } + + uint32_t addr = sa.in4.sin_addr.s_addr; + user->WriteNotice(InspIRCd::Format("*** HEXIP: %s encodes to %02x%02x%02x%02x.", + sa.addr().c_str(), (addr & 0xFF), ((addr >> 8) & 0xFF), ((addr >> 16) & 0xFF), + ((addr >> 24) & 0xFF))); + return CMD_SUCCESS; + } + + if (ParseIP(parameters[0], sa)) + { + user->WriteNotice(InspIRCd::Format("*** HEXIP: %s decodes to %s.", + parameters[0].c_str(), sa.addr().c_str())); + return CMD_SUCCESS; + } + + user->WriteNotice(InspIRCd::Format("*** HEXIP: %s is not a valid raw or hex encoded IPv4 address.", + parameters[0].c_str())); + return CMD_FAILURE; + } + + static bool ParseIP(const std::string& in, irc::sockets::sockaddrs& out) + { + const char* ident = NULL; + if (in.length() == 8) + { + // The ident is an IPv4 address encoded in hexadecimal with two characters + // per address segment. + ident = in.c_str(); + } + else if (in.length() == 9 && in[0] == '~') + { + // The same as above but m_ident got to this user before we did. Strip the + // ident prefix and continue as normal. + ident = in.c_str() + 1; + } + else + { + // The user either does not have an IPv4 in their ident or the gateway server + // is also running an identd. In the latter case there isn't really a lot we + // can do so we just assume that the client in question is not connecting via + // an ident gateway. + return false; + } + + // Try to convert the IP address to a string. If this fails then the user + // does not have an IPv4 address in their ident. + errno = 0; + unsigned long address = strtoul(ident, NULL, 16); + if (errno) + return false; + + out.in4.sin_family = AF_INET; + out.in4.sin_addr.s_addr = htonl(address); + return true; + } +}; + class CommandWebIRC : public SplitCommand { public: @@ -236,49 +314,15 @@ class ModuleCgiIRC , public Whois::EventListener { private: + CommandHexIP cmdhexip; CommandWebIRC cmdwebirc; std::vector hosts; - static bool ParseIdent(LocalUser* user, irc::sockets::sockaddrs& out) - { - const char* ident = NULL; - if (user->ident.length() == 8) - { - // The ident is an IPv4 address encoded in hexadecimal with two characters - // per address segment. - ident = user->ident.c_str(); - } - else if (user->ident.length() == 9 && user->ident[0] == '~') - { - // The same as above but m_ident got to this user before we did. Strip the - // ident prefix and continue as normal. - ident = user->ident.c_str() + 1; - } - else - { - // The user either does not have an IPv4 in their ident or the gateway server - // is also running an identd. In the latter case there isn't really a lot we - // can do so we just assume that the client in question is not connecting via - // an ident gateway. - return false; - } - - // Try to convert the IP address to a string. If this fails then the user - // does not have an IPv4 address in their ident. - errno = 0; - unsigned long address = strtoul(ident, NULL, 16); - if (errno) - return false; - - out.in4.sin_family = AF_INET; - out.in4.sin_addr.s_addr = htonl(address); - return true; - } - public: ModuleCgiIRC() : WebIRC::EventListener(this) , Whois::EventListener(this) + , cmdhexip(this) , cmdwebirc(this) { } @@ -392,7 +436,7 @@ class ModuleCgiIRC // We have matched an block! Try to parse the encoded IPv4 address // out of the ident. irc::sockets::sockaddrs address(user->client_sa); - if (!ParseIdent(user, address)) + if (!CommandHexIP::ParseIP(user->ident, address)) return MOD_RES_PASSTHRU; // Store the hostname and IP of the gateway for later use. -- cgit v1.3.1-10-gc9f91 From 6f4aee365b5af9a9c6f733be8dbfc3365d15a866 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 21 Feb 2021 04:09:59 +0000 Subject: Add a config option for exempting classes from connflood. --- docs/conf/inspircd.conf.example | 4 ++++ docs/conf/providers/irccloud.conf.example | 1 + src/modules/m_connflood.cpp | 13 ++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index fecaafdc2..cdfb6f3c2 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -308,6 +308,10 @@ # This setting only has effect when the connectban module is loaded. #useconnectban="yes" + # useconnflood: Defines if users in this class should be exempt from connflood limits. + # This setting only has effect when the connflood module is loaded. + #useconnflood="yes" + # usednsbl: Defines whether or not users in this class are subject to DNSBL. Default is yes. # This setting only has effect when the dnsbl module is loaded. #usednsbl="yes" diff --git a/docs/conf/providers/irccloud.conf.example b/docs/conf/providers/irccloud.conf.example index 559e93459..35f08590d 100644 --- a/docs/conf/providers/irccloud.conf.example +++ b/docs/conf/providers/irccloud.conf.example @@ -8,6 +8,7 @@ globalmax="100" localmax="100" useconnectban="no" + useconnflood="no" usednsbl="no"> diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index 809055a5a..fe581e072 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -27,6 +27,7 @@ class ModuleConnFlood : public Module { + private: unsigned int seconds; unsigned int timeout; unsigned int boot_wait; @@ -36,6 +37,16 @@ class ModuleConnFlood : public Module time_t first; std::string quitmsg; + static bool IsExempt(LocalUser* user) + { + // E-lined and already banned users shouldn't be hit. + if (user->exempt || user->quitting) + return true; + + // Users in an exempt class shouldn't be hit. + return user->GetClass() && !user->GetClass()->config->getBool("useconnflood", true); + } + public: ModuleConnFlood() : conns(0), throttled(false) @@ -65,7 +76,7 @@ public: ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE { - if (user->exempt) + if (IsExempt(user)) return MOD_RES_PASSTHRU; time_t next = ServerInstance->Time(); -- cgit v1.3.1-10-gc9f91 From 3204c82068de521da9d73b5a52e1bdf814fb85a4 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 21 Feb 2021 07:51:43 +0000 Subject: Fix checking the wrong user in SERVLIST. --- src/coremods/core_info/cmd_servlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/coremods/core_info/cmd_servlist.cpp b/src/coremods/core_info/cmd_servlist.cpp index a6f4101ee..72f656477 100644 --- a/src/coremods/core_info/cmd_servlist.cpp +++ b/src/coremods/core_info/cmd_servlist.cpp @@ -45,7 +45,7 @@ CmdResult CommandServList::HandleLocal(LocalUser* user, const Params& parameters if (uline->IsModeSet(invisiblemode) || !InspIRCd::Match(uline->nick, mask)) continue; - if (has_type && (!user->IsOper() || !InspIRCd::Match(user->oper->name, parameters[2 ]))) + if (has_type && (!uline->IsOper() || !InspIRCd::Match(uline->oper->name, parameters[2]))) continue; Numeric::Numeric numeric(RPL_SERVLIST); -- cgit v1.3.1-10-gc9f91 From 262ad80560b168da596a2c2874f07c9fe263bf35 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 22 Feb 2021 03:10:50 +0000 Subject: Add a human-readable serialiser to the geolocation extensible. --- src/modules/extra/m_geo_maxmind.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 2850e0501..6f5d4ef20 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -43,6 +43,12 @@ class GeolocationExtItem : public ExtensionItem { } + std::string ToHuman(const Extensible* container, void* item) const CXX11_OVERRIDE + { + Geolocation::Location* location = static_cast(item); + return location->GetName() + " [" + location->GetCode() + "]"; + } + void free(Extensible* container, void* item) CXX11_OVERRIDE { Geolocation::Location* old = static_cast(item); -- cgit v1.3.1-10-gc9f91 From 70f4f0225cf4357b6fa3c57cd63b49da79b9eeef Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 22 Feb 2021 04:16:24 +0000 Subject: Add snomask permissions to the oper check output. --- src/modules/m_check.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 5434f8054..3291c63e6 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -146,6 +146,15 @@ class CommandCheck : public Command return ret; } + static std::string GetAllowedOperOnlySnomasks(LocalUser* user) + { + std::string ret; + for (unsigned char sno = 'A'; sno <= 'z'; ++sno) + if (ServerInstance->SNO->IsSnomaskUsable(sno) && user->HasSnomaskPermission(sno)) + ret.push_back(sno); + return ret; + } + public: CommandCheck(Module* parent) : Command(parent,"CHECK", 1) @@ -209,6 +218,7 @@ class CommandCheck : public Command { context.Write("chanmodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_CHANNEL)); context.Write("usermodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_USER)); + context.Write("snomaskperms", GetAllowedOperOnlySnomasks(loctarg)); context.Write("commandperms", oper->AllowedOperCommands.ToString()); context.Write("permissions", oper->AllowedPrivs.ToString()); } -- cgit v1.3.1-10-gc9f91 From 5860247c3bf664daac1234f47f68ed30402fe13d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 24 Feb 2021 18:08:15 +0000 Subject: Refactor OnUserPostMessage in the chanhistory module. --- src/modules/m_chanhistory.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index 4bd230a7c..25110b495 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -221,18 +221,20 @@ class ModuleChanHistory void OnUserPostMessage(User* user, const MessageTarget& target, const MessageDetails& details) CXX11_OVERRIDE { + if (target.type != MessageTarget::TYPE_CHANNEL || target.status) + return; + std::string ctcpname; - if ((target.type == MessageTarget::TYPE_CHANNEL) && (target.status == 0) && (!details.IsCTCP(ctcpname) || irc::equals(ctcpname, "ACTION"))) - { - Channel* c = target.Get(); - HistoryList* list = historymode.ext.get(c); - if (list) - { - list->lines.push_back(HistoryItem(user, details)); - if (list->lines.size() > list->maxlen) - list->lines.pop_front(); - } - } + if (details.IsCTCP(ctcpname) && !irc::equals(ctcpname, "ACTION")) + return; + + HistoryList* list = historymode.ext.get(target.Get()); + if (!list) + return; + + list->lines.push_back(HistoryItem(user, details)); + if (list->lines.size() > list->maxlen) + list->lines.pop_front(); } void OnPostJoin(Membership* memb) CXX11_OVERRIDE -- cgit v1.3.1-10-gc9f91 From 61225fa14fe0c8335cbfec7a9764cfc3f31936bc Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 25 Feb 2021 06:47:34 +0000 Subject: Allow a statusmsg to have multiple statuses and pick the lowest. This is pretty much useless but other implementations support it so we have to also support it for compatibility. --- include/numerics.h | 1 + src/coremods/core_message.cpp | 21 ++++++++++++++++----- src/modules/m_ircv3_ctctags.cpp | 21 ++++++++++++++++----- 3 files changed, 33 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/include/numerics.h b/include/numerics.h index 98abf2bbe..a50b7c518 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -114,6 +114,7 @@ enum ERR_TOOMANYCHANNELS = 405, ERR_WASNOSUCHNICK = 406, ERR_NOSUCHSERVICE = 408, // From RFC 2812. + ERR_NORECIPIENT = 411, ERR_NOTEXTTOSEND = 412, ERR_UNKNOWNCOMMAND = 421, ERR_NOMOTD = 422, diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 75abd6900..94eefee22 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -298,15 +298,26 @@ class CommandMessage : public Command if (parameters[0][0] == '$') return HandleServerTarget(user, parameters); - // If the message begins with a status character then look it up. + // If the message begins with one or more status characters then look them up. const char* target = parameters[0].c_str(); - PrefixMode* pmh = ServerInstance->Modes->FindPrefix(target[0]); - if (pmh) - target++; + PrefixMode* targetpfx = NULL; + for (PrefixMode* pfx; (pfx = ServerInstance->Modes->FindPrefix(target[0])); ++target) + { + // We want the lowest ranked prefix specified. + if (!targetpfx || pfx->GetPrefixRank() < targetpfx->GetPrefixRank()) + targetpfx = pfx; + } + + if (!target[0]) + { + // The target consisted solely of prefix modes. + user->WriteNumeric(ERR_NORECIPIENT, "No recipient given"); + return CMD_FAILURE; + } // The target is a channel name. if (*target == '#') - return HandleChannelTarget(user, parameters, target, pmh); + return HandleChannelTarget(user, parameters, target, targetpfx); // The target is a nickname. return HandleUserTarget(user, parameters); diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index 285657987..6ef1ed30d 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -234,15 +234,26 @@ class CommandTagMsg : public Command if (parameters[0][0] == '$') return HandleServerTarget(user, parameters); - // If the message begins with a status character then look it up. + // If the message begins with one or more status characters then look them up. const char* target = parameters[0].c_str(); - PrefixMode* pmh = ServerInstance->Modes->FindPrefix(target[0]); - if (pmh) - target++; + PrefixMode* targetpfx = NULL; + for (PrefixMode* pfx; (pfx = ServerInstance->Modes->FindPrefix(target[0])); ++target) + { + // We want the lowest ranked prefix specified. + if (!targetpfx || pfx->GetPrefixRank() < targetpfx->GetPrefixRank()) + targetpfx = pfx; + } + + if (!target[0]) + { + // The target consisted solely of prefix modes. + user->WriteNumeric(ERR_NORECIPIENT, "No recipient given"); + return CMD_FAILURE; + } // The target is a channel name. if (*target == '#') - return HandleChannelTarget(user, parameters, target, pmh); + return HandleChannelTarget(user, parameters, target, targetpfx); // The target is a nickname. return HandleUserTarget(user, parameters); -- cgit v1.3.1-10-gc9f91 From 0db24252fd119cafee34f1bfa023763fcdd7ebf5 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 25 Feb 2021 20:06:46 +0000 Subject: Implement support for multi-prefix on WHOIS. --- include/modules/whois.h | 16 +++++++++++++++ src/coremods/core_whois.cpp | 16 --------------- src/modules/m_namesx.cpp | 47 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/include/modules/whois.h b/include/modules/whois.h index f158f82cc..c081a2b6a 100644 --- a/include/modules/whois.h +++ b/include/modules/whois.h @@ -28,6 +28,22 @@ namespace Whois class Context; } +enum +{ + // From RFC 1459. + RPL_WHOISUSER = 311, + RPL_WHOISOPERATOR = 313, + RPL_WHOISIDLE = 317, + RPL_WHOISCHANNELS = 319, + + // From UnrealIRCd. + RPL_WHOISHOST = 378, + RPL_WHOISMODES = 379, + + // InspIRCd-specific. + RPL_CHANNELSMSG = 651 +}; + class Whois::EventListener : public Events::ModuleEventListener { public: diff --git a/src/coremods/core_whois.cpp b/src/coremods/core_whois.cpp index bd0502998..c1c4777ef 100644 --- a/src/coremods/core_whois.cpp +++ b/src/coremods/core_whois.cpp @@ -30,22 +30,6 @@ #include "inspircd.h" #include "modules/whois.h" -enum -{ - // From RFC 1459. - RPL_WHOISUSER = 311, - RPL_WHOISOPERATOR = 313, - RPL_WHOISIDLE = 317, - RPL_WHOISCHANNELS = 319, - - // From UnrealIRCd. - RPL_WHOISHOST = 378, - RPL_WHOISMODES = 379, - - // InspIRCd-specific. - RPL_CHANNELSMSG = 651 -}; - enum SplitWhoisState { // Don't split private/secret channels into a separate RPL_WHOISCHANNELS numeric. diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 4f93da21a..ed983b32d 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -27,11 +27,13 @@ #include "modules/cap.h" #include "modules/names.h" #include "modules/who.h" +#include "modules/whois.h" class ModuleNamesX : public Module , public Names::EventListener , public Who::EventListener + , public Whois::LineEventListener { private: Cap::Capability cap; @@ -40,6 +42,7 @@ class ModuleNamesX ModuleNamesX() : Names::EventListener(this) , Who::EventListener(this) + , Whois::LineEventListener(this) , cap(this, "multi-prefix") { } @@ -104,6 +107,50 @@ class ModuleNamesX numeric.GetParams()[flag_index].append(prefixes, 1, std::string::npos); return MOD_RES_PASSTHRU; } + + ModResult OnWhoisLine(Whois::Context& whois, Numeric::Numeric& numeric) CXX11_OVERRIDE + { + if (numeric.GetNumeric() != RPL_WHOISCHANNELS || !cap.get(whois.GetSource())) + return MOD_RES_PASSTHRU; + + // :testnet.inspircd.org 319 test Sadie :#test ~#inspircd + if (numeric.GetParams().size() < 2 || numeric.GetParams().back().empty()) + return MOD_RES_PASSTHRU; + + std::stringstream newchannels; + irc::spacesepstream channelstream(numeric.GetParams().back()); + for (std::string channel; channelstream.GetToken(channel); ) + { + size_t hashpos = channel.find('#'); + if (!hashpos || hashpos == std::string::npos) + { + // The entry is malformed or the user has no privs. + newchannels << channel << ' '; + continue; + } + + Channel* chan = ServerInstance->FindChan(channel.substr(hashpos)); + if (!chan) + { + // Should never happen. + newchannels << channel << ' '; + continue; + } + + Membership* memb = chan->GetUser(whois.GetTarget()); + if (!memb) + { + // Should never happen. + newchannels << channel << ' '; + continue; + } + + newchannels << memb->GetAllPrefixChars() << chan->name << ' '; + } + + numeric.GetParams().back() = newchannels.str(); + return MOD_RES_PASSTHRU; + } }; MODULE_INIT(ModuleNamesX) -- cgit v1.3.1-10-gc9f91 From 1bf7ca389426e196697eba9a8b60277db03fbedb Mon Sep 17 00:00:00 2001 From: InspIRCd Robot Date: Fri, 26 Feb 2021 06:58:13 +0000 Subject: Update copyright headers. --- configure | 3 +-- include/base.h | 2 +- include/compat.h | 2 +- include/configparser.h | 2 +- include/configreader.h | 2 +- include/modules/cap.h | 2 +- include/modules/dns.h | 2 +- include/modules/whois.h | 1 + include/numerics.h | 2 +- make/calcdep.pl | 2 +- make/common.pm | 2 +- make/configure.pm | 2 +- make/console.pm | 2 +- make/directive.pm | 2 +- make/template/apparmor | 2 +- make/template/config.h | 2 +- make/template/inspircd | 3 +-- make/test/compiler.cpp | 2 +- make/test/eventfd.cpp | 2 +- make/unit-cc.pl | 2 +- modulemanager | 2 +- src/configreader.cpp | 2 +- src/coremods/core_dns.cpp | 2 +- src/coremods/core_info/cmd_admin.cpp | 2 +- src/coremods/core_info/cmd_info.cpp | 2 +- src/coremods/core_info/cmd_servlist.cpp | 2 +- src/coremods/core_info/cmd_time.cpp | 2 +- src/coremods/core_message.cpp | 2 +- src/coremods/core_reloadmodule.cpp | 2 +- src/coremods/core_stub.cpp | 2 +- src/coremods/core_user/umode_s.cpp | 2 +- src/cull_list.cpp | 2 +- src/inspircd.cpp | 4 ++-- src/modules/extra/m_argon2.cpp | 1 + src/modules/extra/m_geo_maxmind.cpp | 2 +- src/modules/extra/m_ssl_gnutls.cpp | 2 +- src/modules/extra/m_ssl_mbedtls.cpp | 2 +- src/modules/extra/m_ssl_openssl.cpp | 2 +- src/modules/m_alias.cpp | 4 ++-- src/modules/m_cgiirc.cpp | 2 +- src/modules/m_chanhistory.cpp | 2 +- src/modules/m_check.cpp | 2 +- src/modules/m_connectban.cpp | 2 +- src/modules/m_connflood.cpp | 2 +- src/modules/m_dnsbl.cpp | 2 +- src/modules/m_globalload.cpp | 4 ++-- src/modules/m_httpd_config.cpp | 3 +-- src/modules/m_httpd_stats.cpp | 2 +- src/modules/m_ircv3_batch.cpp | 2 +- src/modules/m_ircv3_ctctags.cpp | 2 +- src/modules/m_ldapoper.cpp | 3 ++- src/modules/m_mlock.cpp | 2 +- src/modules/m_namesx.cpp | 2 +- src/modules/m_override.cpp | 1 + src/modules/m_pbkdf2.cpp | 2 +- src/modules/m_permchannels.cpp | 2 +- src/modules/m_repeat.cpp | 1 + src/modules/m_sanick.cpp | 2 +- src/modules/m_sha1.cpp | 2 +- src/modules/m_shun.cpp | 2 +- src/modules/m_spanningtree/capab.cpp | 2 +- src/modules/m_spanningtree/misccommands.cpp | 2 +- src/modules/m_spanningtree/override_map.cpp | 1 + src/modules/m_spanningtree/svsnick.cpp | 2 +- src/modules/m_sslinfo.cpp | 3 +-- src/socket.cpp | 2 +- src/socketengines/socketengine_epoll.cpp | 2 +- src/usermanager.cpp | 2 +- src/users.cpp | 2 +- tools/directive | 2 +- tools/genssl | 2 +- tools/mkdescriptions | 2 +- tools/mkheaders | 2 +- tools/test-build | 2 +- tools/testssl | 2 +- win/inspircd_win32wrapper.h | 2 +- 76 files changed, 80 insertions(+), 78 deletions(-) (limited to 'src') diff --git a/configure b/configure index 346365a2a..10c75ce35 100755 --- a/configure +++ b/configure @@ -6,8 +6,7 @@ # Copyright (C) 2020 Daniel Vassdal # Copyright (C) 2019 Matt Schatz # Copyright (C) 2019 Anatole Denis -# Copyright (C) 2017 emerson -# Copyright (C) 2013-2020 Sadie Powell +# Copyright (C) 2013-2021 Sadie Powell # Copyright (C) 2012, 2019 Robby # Copyright (C) 2012 ChrisTX # Copyright (C) 2010 Daniel De Graaf diff --git a/include/base.h b/include/base.h index b915d9ae4..e36e5118c 100644 --- a/include/base.h +++ b/include/base.h @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2013, 2015 Attila Molnar - * Copyright (C) 2012-2013, 2017 Sadie Powell + * Copyright (C) 2012-2013, 2017, 2020 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2012 ChrisTX * Copyright (C) 2011-2012 Adam diff --git a/include/compat.h b/include/compat.h index 886805243..8fbd2acad 100644 --- a/include/compat.h +++ b/include/compat.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013-2014, 2017 Sadie Powell + * Copyright (C) 2013-2014, 2017, 2021 Sadie Powell * Copyright (C) 2013-2014, 2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/include/configparser.h b/include/configparser.h index 9fb66675f..bdf763341 100644 --- a/include/configparser.h +++ b/include/configparser.h @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2014 Attila Molnar - * Copyright (C) 2013, 2016 Sadie Powell + * Copyright (C) 2013, 2016, 2021 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2009-2010 Daniel De Graaf * diff --git a/include/configreader.h b/include/configreader.h index 8a548fcbf..0d2e5ae16 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -5,7 +5,7 @@ * Copyright (C) 2018 Chris Novakovic * Copyright (C) 2013-2014, 2016 Attila Molnar * Copyright (C) 2013 Daniel Vassdal - * Copyright (C) 2012-2014, 2016-2020 Sadie Powell + * Copyright (C) 2012-2014, 2016-2021 Sadie Powell * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2008 Thomas Stagner diff --git a/include/modules/cap.h b/include/modules/cap.h index 664120d39..0bbd745c0 100644 --- a/include/modules/cap.h +++ b/include/modules/cap.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2021 Sadie Powell * Copyright (C) 2015-2016, 2018 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/include/modules/dns.h b/include/modules/dns.h index 6e7527a55..141951fd3 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017, 2019 Sadie Powell + * Copyright (C) 2017, 2019, 2021 Sadie Powell * Copyright (C) 2014-2015 Attila Molnar * Copyright (C) 2013, 2015-2016 Adam * diff --git a/include/modules/whois.h b/include/modules/whois.h index c081a2b6a..2ac46dcd4 100644 --- a/include/modules/whois.h +++ b/include/modules/whois.h @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2021 Sadie Powell * Copyright (C) 2015-2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/include/numerics.h b/include/numerics.h index a50b7c518..4d33a16b7 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -3,7 +3,7 @@ * * Copyright (C) 2017 B00mX0r * Copyright (C) 2016 Attila Molnar - * Copyright (C) 2013, 2015-2018, 2020 Sadie Powell + * Copyright (C) 2013, 2015-2018, 2020-2021 Sadie Powell * Copyright (C) 2013 Adam * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009 Uli Schlachter diff --git a/make/calcdep.pl b/make/calcdep.pl index ca6b2628c..5ef736f46 100755 --- a/make/calcdep.pl +++ b/make/calcdep.pl @@ -3,7 +3,7 @@ # InspIRCd -- Internet Relay Chat Daemon # # Copyright (C) 2014-2015 Attila Molnar -# Copyright (C) 2013, 2015-2019 Sadie Powell +# Copyright (C) 2013, 2015-2019, 2021 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2009-2010 Daniel De Graaf # diff --git a/make/common.pm b/make/common.pm index 519e7fba8..7046b878f 100644 --- a/make/common.pm +++ b/make/common.pm @@ -1,7 +1,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2014-2017, 2019-2020 Sadie Powell +# Copyright (C) 2014-2017, 2019-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/configure.pm b/make/configure.pm index f096fcd90..223f4e58a 100644 --- a/make/configure.pm +++ b/make/configure.pm @@ -2,7 +2,7 @@ # InspIRCd -- Internet Relay Chat Daemon # # Copyright (C) 2020 Nicole Kleinhoff -# Copyright (C) 2013-2020 Sadie Powell +# Copyright (C) 2013-2021 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2007-2008 Craig Edwards # Copyright (C) 2007 Dennis Friis diff --git a/make/console.pm b/make/console.pm index cd2a780e7..e6f8d4838 100644 --- a/make/console.pm +++ b/make/console.pm @@ -1,7 +1,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2014-2017, 2019 Sadie Powell +# Copyright (C) 2014-2017, 2019-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/directive.pm b/make/directive.pm index cd1aff426..698934001 100644 --- a/make/directive.pm +++ b/make/directive.pm @@ -1,7 +1,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2016-2020 Sadie Powell +# Copyright (C) 2016-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/template/apparmor b/make/template/apparmor index ded5634e6..15ecacd54 100644 --- a/make/template/apparmor +++ b/make/template/apparmor @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2020 Sadie Powell +# Copyright (C) 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/template/config.h b/make/template/config.h index ec3cff94a..236af5216 100644 --- a/make/template/config.h +++ b/make/template/config.h @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2014, 2016, 2018-2020 Sadie Powell + * Copyright (C) 2014, 2016, 2018-2021 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/template/inspircd b/make/template/inspircd index 9bc7dd85f..213f78043 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -6,9 +6,8 @@ # Copyright (C) 2015 Steven Van Acker # Copyright (C) 2015 Attila Molnar # Copyright (C) 2014 Dan Parsons -# Copyright (C) 2013-2014, 2016-2019 Sadie Powell +# Copyright (C) 2013-2014, 2016-2021 Sadie Powell # Copyright (C) 2012 Robby -# Copyright (C) 2012 Adam # Copyright (C) 2011 DjSlash # Copyright (C) 2009-2010 Daniel De Graaf # Copyright (C) 2008-2009 Robin Burchell diff --git a/make/test/compiler.cpp b/make/test/compiler.cpp index 524874ed6..13aede9fe 100644 --- a/make/test/compiler.cpp +++ b/make/test/compiler.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2016 Attila Molnar - * Copyright (C) 2014-2015, 2017 Sadie Powell + * Copyright (C) 2014-2015, 2017, 2021 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/make/test/eventfd.cpp b/make/test/eventfd.cpp index 61029f5dd..08f7a7561 100644 --- a/make/test/eventfd.cpp +++ b/make/test/eventfd.cpp @@ -1,8 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2012 William Pitcock * Copyright (C) 2012 Robby + * Copyright (C) 2012 Ariadne Conill * Copyright (C) 2009 Daniel De Graaf * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/make/unit-cc.pl b/make/unit-cc.pl index f555c3812..f4fa5a650 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -4,7 +4,7 @@ # # Copyright (C) 2019 iwalkalone # Copyright (C) 2014 Attila Molnar -# Copyright (C) 2013, 2015-2016, 2018 Sadie Powell +# Copyright (C) 2013, 2015-2016, 2018, 2021 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2009-2010 Daniel De Graaf # diff --git a/modulemanager b/modulemanager index 9bedfcc65..891f309a8 100755 --- a/modulemanager +++ b/modulemanager @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2012-2014, 2017-2020 Sadie Powell +# Copyright (C) 2012-2014, 2017-2021 Sadie Powell # Copyright (C) 2012 Robby # Copyright (C) 2009-2010 Daniel De Graaf # Copyright (C) 2008-2009 Robin Burchell diff --git a/src/configreader.cpp b/src/configreader.cpp index 3977be25e..304dc3705 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2019 Matt Schatz * Copyright (C) 2013-2016 Attila Molnar - * Copyright (C) 2013-2014, 2016-2020 Sadie Powell + * Copyright (C) 2013-2014, 2016-2021 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2012 Robby * Copyright (C) 2012 Justin Crawford diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index dbfb0b582..b16658242 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 Robby - * Copyright (C) 2015, 2017-2020 Sadie Powell + * Copyright (C) 2015, 2017-2021 Sadie Powell * Copyright (C) 2013-2016 Attila Molnar * Copyright (C) 2013, 2015-2016 Adam * diff --git a/src/coremods/core_info/cmd_admin.cpp b/src/coremods/core_info/cmd_admin.cpp index 07be23e68..e3ad86fdd 100644 --- a/src/coremods/core_info/cmd_admin.cpp +++ b/src/coremods/core_info/cmd_admin.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2014, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/coremods/core_info/cmd_info.cpp b/src/coremods/core_info/cmd_info.cpp index 61aea6bc6..66f5558e1 100644 --- a/src/coremods/core_info/cmd_info.cpp +++ b/src/coremods/core_info/cmd_info.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2020 Sadie Powell + * Copyright (C) 2018-2021 Sadie Powell * Copyright (C) 2015 Robin Burchell * Copyright (C) 2013-2014, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby diff --git a/src/coremods/core_info/cmd_servlist.cpp b/src/coremods/core_info/cmd_servlist.cpp index 72f656477..bde8a6f6c 100644 --- a/src/coremods/core_info/cmd_servlist.cpp +++ b/src/coremods/core_info/cmd_servlist.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2020 Sadie Powell + * Copyright (C) 2020-2021 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/coremods/core_info/cmd_time.cpp b/src/coremods/core_info/cmd_time.cpp index a880d7a0e..4be57e432 100644 --- a/src/coremods/core_info/cmd_time.cpp +++ b/src/coremods/core_info/cmd_time.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2014, 2016 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/coremods/core_message.cpp b/src/coremods/core_message.cpp index 94eefee22..6966bc6d5 100644 --- a/src/coremods/core_message.cpp +++ b/src/coremods/core_message.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017-2020 Sadie Powell + * Copyright (C) 2017-2021 Sadie Powell * Copyright (C) 2013, 2017-2018 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009 Daniel De Graaf diff --git a/src/coremods/core_reloadmodule.cpp b/src/coremods/core_reloadmodule.cpp index 34eaeae18..6836cb55c 100644 --- a/src/coremods/core_reloadmodule.cpp +++ b/src/coremods/core_reloadmodule.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2017-2019, 2021 Sadie Powell * Copyright (C) 2014-2016, 2018 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2009 Daniel De Graaf diff --git a/src/coremods/core_stub.cpp b/src/coremods/core_stub.cpp index 0448067c0..460068da5 100644 --- a/src/coremods/core_stub.cpp +++ b/src/coremods/core_stub.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 Robby - * Copyright (C) 2017-2019 Sadie Powell + * Copyright (C) 2017-2020 Sadie Powell * Copyright (C) 2014-2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/coremods/core_user/umode_s.cpp b/src/coremods/core_user/umode_s.cpp index 7080b277f..d93fc6a2a 100644 --- a/src/coremods/core_user/umode_s.cpp +++ b/src/coremods/core_user/umode_s.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017, 2020 Sadie Powell + * Copyright (C) 2017, 2020-2021 Sadie Powell * Copyright (C) 2013, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009 Daniel De Graaf diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 80d7ddb97..c050e9887 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2015 Attila Molnar - * Copyright (C) 2013 Sadie Powell + * Copyright (C) 2013, 2020 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2011 jackmcbarn * Copyright (C) 2009 Uli Schlachter diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 8cbb83d6f..c0d7a1614 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -3,12 +3,12 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2018 Chris Novakovic - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2018-2021 Sadie Powell * Copyright (C) 2013 Adam * Copyright (C) 2012-2014, 2016, 2018 Attila Molnar - * Copyright (C) 2012 William Pitcock * Copyright (C) 2012 Robby * Copyright (C) 2012 ChrisTX + * Copyright (C) 2012 Ariadne Conill * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2008 Thomas Stagner diff --git a/src/modules/extra/m_argon2.cpp b/src/modules/extra/m_argon2.cpp index 50c678a52..9a3826723 100644 --- a/src/modules/extra/m_argon2.cpp +++ b/src/modules/extra/m_argon2.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2020 Elizabeth Myers * Copyright (C) 2020 Daniel Vassdal * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 6f5d4ef20..86bb7bfca 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2019-2020 Sadie Powell + * Copyright (C) 2019-2021 Sadie Powell * Copyright (C) 2019 Matt Schatz * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index de8edb428..b6eee5836 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2013-2014, 2016-2020 Sadie Powell + * Copyright (C) 2013-2014, 2016-2021 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2012-2017 Attila Molnar * Copyright (C) 2012-2013, 2016 Adam diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index a787ba993..9c2a535ae 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2020 Matt Schatz - * Copyright (C) 2016-2020 Sadie Powell + * Copyright (C) 2016-2021 Sadie Powell * Copyright (C) 2016-2017 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index b34eda6bf..910b81950 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -6,7 +6,7 @@ * Copyright (C) 2017 Wade Cline * Copyright (C) 2014, 2016 Adam * Copyright (C) 2014 Julien Vehent - * Copyright (C) 2013-2014, 2016-2020 Sadie Powell + * Copyright (C) 2013-2014, 2016-2021 Sadie Powell * Copyright (C) 2012-2017 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2012 ChrisTX diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 478bfb3d9..7154563ec 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -2,8 +2,8 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2018-2019 linuxdaemon - * Copyright (C) 2013-2016, 2018 Attila Molnar - * Copyright (C) 2013, 2015-2019 Sadie Powell + * Copyright (C) 2013-2015, 2018 Attila Molnar + * Copyright (C) 2013, 2015-2019, 2021 Sadie Powell * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2009 Matt Smith diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 971826b31..9ad25e6fb 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2019 linuxdaemon * Copyright (C) 2014 md_5 * Copyright (C) 2014 Googolplexed - * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell + * Copyright (C) 2013, 2017-2018, 2020-2021 Sadie Powell * Copyright (C) 2013 Adam * Copyright (C) 2012-2013, 2015 Attila Molnar * Copyright (C) 2012, 2019 Robby diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index 25110b495..38ec217df 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2018 linuxdaemon - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2012-2015, 2018 Attila Molnar * Copyright (C) 2012, 2019 Robby diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 3291c63e6..f19f610e9 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2013-2016 Attila Molnar - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2012, 2019 Robby * Copyright (C) 2010 Craig Edwards * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index b4b16f539..aa94adc2e 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2019 Matt Schatz * Copyright (C) 2014 Googolplexed - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2012-2014 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index fe581e072..1f8286e77 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013, 2018-2020 Sadie Powell + * Copyright (C) 2013, 2018-2021 Sadie Powell * Copyright (C) 2012-2013 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2009 Daniel De Graaf diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 9ad3b05e7..6712e2674 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2018-2020 Matt Schatz * Copyright (C) 2018-2019 linuxdaemon - * Copyright (C) 2013, 2016-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2013, 2015-2016 Adam * Copyright (C) 2012-2016 Attila Molnar * Copyright (C) 2012, 2018 Robby diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 15c41502f..490a0f995 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -1,13 +1,13 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell + * Copyright (C) 2013, 2017-2018, 2020-2021 Sadie Powell * Copyright (C) 2012, 2019 Robby * Copyright (C) 2012, 2014-2016 Attila Molnar * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Robin Burchell * Copyright (C) 2007-2008, 2010 Craig Edwards * Copyright (C) 2007-2008 Dennis Friis - * Copyright (C) 2007, 2009 Robin Burchell * Copyright (C) 2007 John Brooks * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index b8b1fd7a7..3a8424168 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -1,8 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2013, 2017-2018 Sadie Powell + * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell * Copyright (C) 2013, 2015 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index f24fd9aec..1e9f4ef4b 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -5,7 +5,7 @@ * Copyright (C) 2018 Matt Schatz * Copyright (C) 2016 Johanna A * Copyright (C) 2013-2016 Attila Molnar - * Copyright (C) 2013, 2017, 2019 Sadie Powell + * Copyright (C) 2013, 2017, 2019-2020 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2009 Daniel De Graaf diff --git a/src/modules/m_ircv3_batch.cpp b/src/modules/m_ircv3_batch.cpp index 197ee3ebe..aa464f9fe 100644 --- a/src/modules/m_ircv3_batch.cpp +++ b/src/modules/m_ircv3_batch.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2018 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/m_ircv3_ctctags.cpp b/src/modules/m_ircv3_ctctags.cpp index 6ef1ed30d..8dd83bd7f 100644 --- a/src/modules/m_ircv3_ctctags.cpp +++ b/src/modules/m_ircv3_ctctags.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2018-2020 Sadie Powell + * Copyright (C) 2018-2021 Sadie Powell * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index 88baf84f3..4304ad8d5 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -1,7 +1,8 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017-2020 Sadie Powell + * Copyright (C) 2020 Christos Triantafyllidis + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2014, 2018 Attila Molnar * Copyright (C) 2013-2014 Adam * diff --git a/src/modules/m_mlock.cpp b/src/modules/m_mlock.cpp index 30f7e137d..5c302961d 100644 --- a/src/modules/m_mlock.cpp +++ b/src/modules/m_mlock.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2013, 2017 Sadie Powell * Copyright (C) 2012, 2019 Robby * Copyright (C) 2012, 2014-2015 Attila Molnar - * Copyright (C) 2012 William Pitcock + * Copyright (C) 2012 Ariadne Conill * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index ed983b32d..020fb99bd 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2013, 2018-2020 Sadie Powell + * Copyright (C) 2013, 2018-2021 Sadie Powell * Copyright (C) 2012-2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 5e9145655..eeb693a2c 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2020 satmd * Copyright (C) 2017 B00mX0r * Copyright (C) 2017 Adam * Copyright (C) 2016 Sheogorath diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp index 077390741..daafa7f8c 100644 --- a/src/modules/m_pbkdf2.cpp +++ b/src/modules/m_pbkdf2.cpp @@ -3,8 +3,8 @@ * * Copyright (C) 2018, 2020 Sadie Powell * Copyright (C) 2018 linuxdaemon + * Copyright (C) 2014, 2020 Daniel Vassdal * Copyright (C) 2014, 2016 Attila Molnar - * Copyright (C) 2014 Daniel Vassdal * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index a408ff142..0f3ac001d 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2014 Justin Crawford - * Copyright (C) 2013-2014, 2017-2019 Sadie Powell + * Copyright (C) 2013-2014, 2017-2020 Sadie Powell * Copyright (C) 2013-2014, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2012, 2014 Adam diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index e6568732b..5a532389a 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2021 iwalkalone * Copyright (C) 2019 Robby * Copyright (C) 2018-2019 linuxdaemon * Copyright (C) 2018 Matt Schatz diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 31813bedf..4487e085a 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -5,7 +5,7 @@ * Copyright (C) 2012-2014, 2016 Attila Molnar * Copyright (C) 2012, 2019 Robby * Copyright (C) 2010 Craig Edwards - * Copyright (C) 2009-2010 Daniel De Graaf + * Copyright (C) 2009 Daniel De Graaf * Copyright (C) 2007-2008 Robin Burchell * Copyright (C) 2007, 2009 Dennis Friis * diff --git a/src/modules/m_sha1.cpp b/src/modules/m_sha1.cpp index 4a577aef2..2d8ce635c 100644 --- a/src/modules/m_sha1.cpp +++ b/src/modules/m_sha1.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2017 Sadie Powell + * Copyright (C) 2017, 2020 Sadie Powell * Copyright (C) 2016 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index d067d1523..943306974 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2019 Matt Schatz * Copyright (C) 2018 linuxdaemon * Copyright (C) 2017-2018 B00mX0r - * Copyright (C) 2013, 2017-2018, 2020 Sadie Powell + * Copyright (C) 2013, 2017-2018, 2020-2021 Sadie Powell * Copyright (C) 2012-2013, 2015-2016 Attila Molnar * Copyright (C) 2012, 2018-2019 Robby * Copyright (C) 2012 Jens Voss diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 4286300e5..9894dd413 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -2,7 +2,7 @@ * InspIRCd -- Internet Relay Chat Daemon * * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2014, 2017-2019 Sadie Powell + * Copyright (C) 2014, 2017-2020 Sadie Powell * Copyright (C) 2014 Daniel Vassdal * Copyright (C) 2012-2016 Attila Molnar * Copyright (C) 2012 Robby diff --git a/src/modules/m_spanningtree/misccommands.cpp b/src/modules/m_spanningtree/misccommands.cpp index bba05b1fc..78ff4db5a 100644 --- a/src/modules/m_spanningtree/misccommands.cpp +++ b/src/modules/m_spanningtree/misccommands.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2013 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can diff --git a/src/modules/m_spanningtree/override_map.cpp b/src/modules/m_spanningtree/override_map.cpp index edc4b0a12..0592eeaf1 100644 --- a/src/modules/m_spanningtree/override_map.cpp +++ b/src/modules/m_spanningtree/override_map.cpp @@ -1,6 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2020 Matt Schatz * Copyright (C) 2017 B00mX0r * Copyright (C) 2016, 2018-2020 Sadie Powell * Copyright (C) 2014 Adam diff --git a/src/modules/m_spanningtree/svsnick.cpp b/src/modules/m_spanningtree/svsnick.cpp index 8d1bc80ba..d66a6b659 100644 --- a/src/modules/m_spanningtree/svsnick.cpp +++ b/src/modules/m_spanningtree/svsnick.cpp @@ -1,7 +1,7 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2018-2019 Sadie Powell + * Copyright (C) 2018-2020 Sadie Powell * Copyright (C) 2013-2016 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2009-2010 Daniel De Graaf diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index d51a691c6..5b22a97b4 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -3,12 +3,11 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2019 linuxdaemon - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2012-2016 Attila Molnar * Copyright (C) 2012 Robby * Copyright (C) 2010 Adam * Copyright (C) 2009-2010 Daniel De Graaf - * Copyright (C) 2008 Robin Burchell * Copyright (C) 2007 Dennis Friis * Copyright (C) 2006-2007, 2009-2010 Craig Edwards * diff --git a/src/socket.cpp b/src/socket.cpp index 37d0fb73b..cfb7b3b52 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -3,7 +3,7 @@ * * Copyright (C) 2019 linuxdaemon * Copyright (C) 2014 Attila Molnar - * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013, 2017-2021 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2012 Robby * Copyright (C) 2009-2011 Daniel De Graaf diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index efaa68234..3e54018a4 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -4,8 +4,8 @@ * Copyright (C) 2014-2015 Attila Molnar * Copyright (C) 2014, 2016 Adam * Copyright (C) 2013, 2017, 2019 Sadie Powell - * Copyright (C) 2012 William Pitcock * Copyright (C) 2012 Robby + * Copyright (C) 2012 Ariadne Conill * Copyright (C) 2009-2010 Daniel De Graaf * Copyright (C) 2008 Thomas Stagner * Copyright (C) 2007-2008 Dennis Friis diff --git a/src/usermanager.cpp b/src/usermanager.cpp index bb325f9ee..a96851c93 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2019 iwalkalone * Copyright (C) 2019 Matt Schatz * Copyright (C) 2013-2016, 2018 Attila Molnar - * Copyright (C) 2013, 2018-2019 Sadie Powell + * Copyright (C) 2013, 2018-2020 Sadie Powell * Copyright (C) 2013, 2015 Adam * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2012, 2019 Robby diff --git a/src/users.cpp b/src/users.cpp index f8d6596f9..b44297a3a 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2019 linuxdaemon * Copyright (C) 2018 systocrat * Copyright (C) 2018 Dylan Frank - * Copyright (C) 2013, 2016-2020 Sadie Powell + * Copyright (C) 2013, 2016-2021 Sadie Powell * Copyright (C) 2013 Daniel Vassdal * Copyright (C) 2013 ChrisTX * Copyright (C) 2013 Adam diff --git a/tools/directive b/tools/directive index c743ed3e6..cdaf490be 100755 --- a/tools/directive +++ b/tools/directive @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2020 Sadie Powell +# Copyright (C) 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tools/genssl b/tools/genssl index aab8ce553..a8fc51514 100755 --- a/tools/genssl +++ b/tools/genssl @@ -3,7 +3,7 @@ # InspIRCd -- Internet Relay Chat Daemon # # Copyright (C) 2020 Nicole Kleinhoff -# Copyright (C) 2013-2017, 2020 Sadie Powell +# Copyright (C) 2013-2017, 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tools/mkdescriptions b/tools/mkdescriptions index 5145422c0..141be7c53 100755 --- a/tools/mkdescriptions +++ b/tools/mkdescriptions @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2020 Sadie Powell +# Copyright (C) 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tools/mkheaders b/tools/mkheaders index f7b1247da..ef5302cfa 100755 --- a/tools/mkheaders +++ b/tools/mkheaders @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2020 Sadie Powell +# Copyright (C) 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tools/test-build b/tools/test-build index 9312940b6..007096a48 100755 --- a/tools/test-build +++ b/tools/test-build @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2013-2016, 2018-2020 Sadie Powell +# Copyright (C) 2013-2016, 2018-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/tools/testssl b/tools/testssl index ea50aee4e..52a152144 100755 --- a/tools/testssl +++ b/tools/testssl @@ -2,7 +2,7 @@ # # InspIRCd -- Internet Relay Chat Daemon # -# Copyright (C) 2020 Sadie Powell +# Copyright (C) 2020-2021 Sadie Powell # # This file is part of InspIRCd. InspIRCd is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h index 368504d61..1694691e9 100644 --- a/win/inspircd_win32wrapper.h +++ b/win/inspircd_win32wrapper.h @@ -3,7 +3,7 @@ * * Copyright (C) 2020 Matt Schatz * Copyright (C) 2013-2015 Attila Molnar - * Copyright (C) 2013, 2015, 2018-2019 Sadie Powell + * Copyright (C) 2013, 2015, 2018-2019, 2021 Sadie Powell * Copyright (C) 2012-2013 ChrisTX * Copyright (C) 2012 Robby * Copyright (C) 2011, 2014, 2019 Adam -- cgit v1.3.1-10-gc9f91 From 9ecea89f1251299a5431797976a7f1603f3c4bf8 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 26 Feb 2021 07:00:33 +0000 Subject: Release v3.9.0. --- include/moduledefs.h | 2 +- src/version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/include/moduledefs.h b/include/moduledefs.h index 564c41f8b..82207524c 100644 --- a/include/moduledefs.h +++ b/include/moduledefs.h @@ -22,7 +22,7 @@ class Module; /** The version of the InspIRCd ABI which is presently in use. */ -#define MODULE_ABI 3014UL +#define MODULE_ABI 3015UL /** Stringifies the value of a symbol. */ #define MODULE_STRINGIFY_SYM1(DEF) MODULE_STRINGIFY_SYM2(DEF) diff --git a/src/version.sh b/src/version.sh index 18a75c166..f9ae35c70 100755 --- a/src/version.sh +++ b/src/version.sh @@ -1,2 +1,2 @@ #!/bin/sh -echo "InspIRCd-3.8.1" +echo "InspIRCd-3.9.0" -- cgit v1.3.1-10-gc9f91 From aa885c1661979b43ab26a682e46ab93306ff8015 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 27 Feb 2021 01:30:45 +0000 Subject: Fix not sending ERR_INVALIDMODEPARAM when a parameter is malformed. Closes #1850. --- include/mode.h | 10 ++++++++++ src/mode.cpp | 11 +++++++++++ 2 files changed, 21 insertions(+) (limited to 'src') diff --git a/include/mode.h b/include/mode.h index 97222bf78..236e1b035 100644 --- a/include/mode.h +++ b/include/mode.h @@ -274,6 +274,7 @@ class CoreExport ModeHandler : public ServiceProvider * @return MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'. */ virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); /* Can change the mode parameter as its a ref */ + /** * If your mode is a listmode, then this method will be called for displaying an item list, e.g. on MODE \#channel +modechar * without any parameter or other modes in the command. @@ -290,6 +291,15 @@ class CoreExport ModeHandler : public ServiceProvider */ virtual void OnParameterMissing(User* user, User* dest, Channel* channel); + /** Called when a user attempts to set a mode and the parameter is invalid. + * @param user The user issuing the mode change + * @param targetchannel Either the channel target or NULL if changing a user mode. + * @param targetuser Either the user target or NULL if changing a channel mode. + * @param parameter The invalid parameter. + */ + virtual void OnParameterInvalid(User* user, Channel* targetchannel, User* targetuser, const std::string& parameter); + + /** * If your mode is a listmode, this method will be called to display an empty list (just the end of list numeric) * @param user The user issuing the command diff --git a/src/mode.cpp b/src/mode.cpp index 1c17a6598..d183d0240 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -104,6 +104,14 @@ void ModeHandler::OnParameterMissing(User* user, User* dest, Channel* channel) user->WriteNumeric(Numerics::InvalidModeParameter(dest, this, "*", message)); } +void ModeHandler::OnParameterInvalid(User* user, Channel* targetchannel, User* targetuser, const std::string& parameter) +{ + if (targetchannel) + user->WriteNumeric(Numerics::InvalidModeParameter(targetchannel, this, "*")); + else + user->WriteNumeric(Numerics::InvalidModeParameter(targetuser, this, "*")); +} + bool ModeHandler::ResolveModeConflict(std::string& theirs, const std::string& ours, Channel*) { return (theirs < ours); @@ -403,7 +411,10 @@ static bool IsModeParamValid(User* user, Channel* targetchannel, User* targetuse // The parameter cannot begin with a ':' character or contain a space if ((item.param[0] == ':') || (item.param.find(' ') != std::string::npos)) + { + item.mh->OnParameterInvalid(user, targetchannel, targetuser, item.param); return false; + } return true; } -- cgit v1.3.1-10-gc9f91