diff options
| author | Sadie Powell <sadie@witchery.services> | 2021-02-18 23:59:28 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2021-02-18 23:59:28 +0000 |
| commit | c68b81eac87314fb0da83a83fed8679e521cf8eb (patch) | |
| tree | 1200203b739e52f652a9ba1170e4813270780edb /modules/protocol | |
| parent | 8b2c1548ab46401f96d4e2e0f8258664e21744fb (diff) | |
| parent | 4d271e021042f0b2708abaff5ff3cfb1504a5cc0 (diff) | |
Merge branch '2.0' into 2.1.
Diffstat (limited to 'modules/protocol')
| -rw-r--r-- | modules/protocol/bahamut.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/charybdis.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/hybrid.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/inspircd.cpp | 27 | ||||
| -rw-r--r-- | modules/protocol/ngircd.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/plexus.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/ratbox.cpp | 2 | ||||
| -rw-r--r-- | modules/protocol/unrealircd.cpp | 2 |
8 files changed, 29 insertions, 12 deletions
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index cc2bc4039..904622bf4 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 c8c2baba4..848284474 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 a6a6a9e78..39914142d 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 <team@anope.org> + * (C) 2003-2021 Anope Team <team@anope.org> * (C) 2012-2020 ircd-hybrid development team * * Please read COPYING and README for further details. diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index e597ce958..1acc3cfd2 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -1,6 +1,6 @@ /* InspIRCd 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. @@ -62,6 +62,7 @@ class InspIRCdProto : public IRCDProto CanSetVHost = true; CanSetVIdent = true; CanSQLine = true; + CanSQLineChannel = true; CanSZLine = true; CanSVSHold = true; CanCertFP = true; @@ -313,7 +314,10 @@ class InspIRCdProto : 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 InspIRCdProto : 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 @@ -405,14 +413,14 @@ class InspIRCdProto : 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 { - 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 @@ -427,6 +435,12 @@ class InspIRCdProto : 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()) @@ -863,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"; } @@ -1099,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) diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 5bf683c7c..f0a287abb 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 <alex@barton.de> - * (C) 2011-2020 Anope Team <team@anope.org> + * (C) 2011-2021 Anope Team <team@anope.org> * * Please read COPYING and README for further details. * diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index f7db95e6b..352d860ca 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 6c4b58358..6d3081939 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/unrealircd.cpp b/modules/protocol/unrealircd.cpp index 99466074d..e19628b2f 100644 --- a/modules/protocol/unrealircd.cpp +++ b/modules/protocol/unrealircd.cpp @@ -1,6 +1,6 @@ /* UnrealIRCd 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. |
