From cdf147f3511ef66c2854c90556943dfe69e609b6 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 12 Oct 2020 17:30:05 +0100 Subject: Fix not sending an account id to InspIRCd on SASL. Also, send the account id first so it shows on the ACCOUNT message. --- modules/protocol/inspircd3.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'modules/protocol') diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index de9406258..2a77a8c7d 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -405,8 +405,8 @@ class InspIRCd3Proto : public IRCDProto if (na->nc->HasExt("UNCONFIRMED")) return; - UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :" << na->nc->display; UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountid :" << na->nc->GetId(); + UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :" << na->nc->display; } void SendLogout(User *u) anope_override @@ -427,6 +427,12 @@ class InspIRCd3Proto : public IRCDProto void SendSVSLogin(const Anope::string &uid, const Anope::string &acc, const Anope::string &vident, const Anope::string &vhost) anope_override { + // TODO: in 2.1 this function should take a NickAlias instead of strings. + NickCore *nc = NickCore::Find(acc); + if (!nc) + return; + + UplinkSocket::Message(Me) << "METADATA " << uid << " accountid :" << nc->GetId(); UplinkSocket::Message(Me) << "METADATA " << uid << " accountname :" << acc; if (!vident.empty()) -- cgit From 95f4e29edda57c2d28c0f58c5a37fa58a0f2140f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 12 Oct 2020 17:47:41 +0100 Subject: Unset the account id before the account name on InspIRCd. This avoids the id being shown on the logout event. --- modules/protocol/inspircd3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/protocol') diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index 2a77a8c7d..c7582f723 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -411,8 +411,8 @@ class InspIRCd3Proto : public IRCDProto void SendLogout(User *u) anope_override { - UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :"; UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountid :"; + UplinkSocket::Message(Me) << "METADATA " << u->GetUID() << " accountname :"; } void SendChannel(Channel *c) anope_override -- cgit From 4031dc73211217b5bab6504bbcf3e60c0c36d8e3 Mon Sep 17 00:00:00 2001 From: Michael Hazell Date: Fri, 1 Jan 2021 14:03:23 -0500 Subject: inspircd3: Enable support for channel SQLines (#268) --- modules/protocol/inspircd3.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'modules/protocol') diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index c7582f723..164785de6 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -62,6 +62,7 @@ class InspIRCd3Proto : public IRCDProto CanSetVHost = true; CanSetVIdent = true; CanSQLine = true; + CanSQLineChannel = true; CanSZLine = true; CanSVSHold = true; CanCertFP = true; @@ -313,7 +314,10 @@ class InspIRCd3Proto : public IRCDProto void SendSQLineDel(const XLine *x) anope_override { - SendDelLine("Q", x->mask); + if (IRCD->CanSQLineChannel && (x->mask[0] == '#')) + SendDelLine("CBAN", x->mask); + else + SendDelLine("Q", x->mask); } void SendSQLine(User *u, const XLine *x) anope_override @@ -322,7 +326,11 @@ class InspIRCd3Proto : public IRCDProto time_t timeleft = x->expires - Anope::CurTime; if (timeleft > 172800 || !x->expires) timeleft = 172800; - SendAddLine("Q", x->mask, timeleft, x->by, x->GetReason()); + + if (IRCD->CanSQLineChannel && (x->mask[0] == '#')) + SendAddLine("CBAN", x->mask, timeleft, x->by, x->GetReason()); + else + SendAddLine("Q", x->mask, timeleft, x->by, x->GetReason()); } void SendVhost(User *u, const Anope::string &vIdent, const Anope::string &vhost) anope_override @@ -869,6 +877,7 @@ struct IRCDMessageCapab : Message::Capab /* reset CAPAB */ Servers::Capab.insert("SERVERS"); Servers::Capab.insert("TOPICLOCK"); + IRCD->CanSQLineChannel = false; IRCD->CanSVSHold = false; IRCD->DefaultPseudoclientModes = "+I"; } @@ -1105,6 +1114,8 @@ struct IRCDMessageCapab : Message::Capab } else if (module.equals_cs("m_topiclock.so")) Servers::Capab.insert("TOPICLOCK"); + else if (module.equals_cs("m_cban.so=glob")) + IRCD->CanSQLineChannel = true; } } else if (params[0].equals_cs("MODSUPPORT") && params.size() > 1) -- cgit From c5a4e8337c3c1315821cb9434db89aac059a17c0 Mon Sep 17 00:00:00 2001 From: Robby Date: Thu, 7 Jan 2021 03:31:08 +0100 Subject: Update copyright to 2021. This was done with: find docs/ include/ language/ modules/ src/ *.* Config -exec sed -i 's/-20.. Anope Team/-2021 Anope Team/i' {} \; --- modules/protocol/bahamut.cpp | 2 +- modules/protocol/charybdis.cpp | 2 +- modules/protocol/hybrid.cpp | 2 +- modules/protocol/inspircd12.cpp | 2 +- modules/protocol/inspircd20.cpp | 2 +- modules/protocol/inspircd3.cpp | 2 +- modules/protocol/ngircd.cpp | 2 +- modules/protocol/plexus.cpp | 2 +- modules/protocol/ratbox.cpp | 2 +- modules/protocol/unreal.cpp | 2 +- modules/protocol/unreal4.cpp | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'modules/protocol') diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 0eb9fdd77..c16fbb482 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -1,6 +1,6 @@ /* Bahamut functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 81d4b14ef..558594a33 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -1,6 +1,6 @@ /* Charybdis IRCD functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index d3de6053a..5c034d624 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -1,6 +1,6 @@ /* ircd-hybrid protocol module. Minimum supported version of ircd-hybrid is 8.2.23. * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * (C) 2012-2020 ircd-hybrid development team * * Please read COPYING and README for further details. diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 294190719..5e4e61eb0 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -1,6 +1,6 @@ /* inspircd 1.2 functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index c6b9c2955..be478055f 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -1,6 +1,6 @@ /* InspIRCd 2.0 functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/inspircd3.cpp b/modules/protocol/inspircd3.cpp index 164785de6..9d0a12969 100644 --- a/modules/protocol/inspircd3.cpp +++ b/modules/protocol/inspircd3.cpp @@ -1,6 +1,6 @@ /* InspIRCd 3.0 functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index f35904c5a..0d062d8ae 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -1,7 +1,7 @@ /* ngIRCd Protocol module for Anope IRC Services * * (C) 2011-2012, 2014 Alexander Barton - * (C) 2011-2020 Anope Team + * (C) 2011-2021 Anope Team * * Please read COPYING and README for further details. * diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index b40d45e6f..b2c5d0528 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -1,6 +1,6 @@ /* Plexus 3+ IRCD functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 692a11c1b..3a5c47728 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -1,6 +1,6 @@ /* Ratbox IRCD functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 383b1f837..2c3b0c0f5 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -1,6 +1,6 @@ /* Unreal IRCD 3.2.x functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index 318ca5417..79b168f35 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -1,6 +1,6 @@ /* Unreal IRCD 4 functions * - * (C) 2003-2020 Anope Team + * (C) 2003-2021 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. -- cgit