summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/anope.example.conf2
-rw-r--r--modules/protocol/inspircd.cpp11
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;