diff options
author | Sadie Powell <sadie@witchery.services> | 2024-09-26 11:22:10 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-09-26 12:51:54 +0100 |
commit | 9fcb022d5e819eaff5cbb71e204ceeff4ca090f0 (patch) | |
tree | 0ae74e86ebbb6e5e2ae875aa921b1506d96d5474 | |
parent | 5a0c6b1f18668c8541412e0ae38d53e3cdc68f01 (diff) |
Allow sending an oper account on InspIRCd.
-rw-r--r-- | data/anope.example.conf | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd.cpp | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/data/anope.example.conf b/data/anope.example.conf index b6ea60d83..2123d1274 100644 --- a/data/anope.example.conf +++ b/data/anope.example.conf @@ -817,8 +817,6 @@ opertype * * This can be used to automatically oper users who identify for services operator accounts, and is * useful for setting modes such as Plexus's user mode +N. - * - * Note that some IRCds, such as InspIRCd, do not allow directly setting +o, and this will not work. */ #modes = "+o" } diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index 258d030cb..563f65bcf 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -637,6 +637,17 @@ public: } } + void SendOper(User *u) override + { + if (spanningtree_proto_ver < 1206) + return; // We can't force an oper on this version. + + const Anope::map<Anope::string> tags = { + { "~automatic", "" }, + }; + Uplink::Send(tags, "SVSOPER", u->GetUID(), u->Account()->o->ot->GetName()); + } + bool IsExtbanValid(const Anope::string &mask) override { bool inverted; |