summaryrefslogtreecommitdiff
path: root/modules/hostserv/hostserv.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-01-13 14:36:55 +0000
committerSadie Powell <sadie@witchery.services>2025-01-13 14:36:55 +0000
commit098074ba8b18d53a4620464795e81aa052c285f9 (patch)
tree1901682321f29a05169521ce7cdf538134826290 /modules/hostserv/hostserv.cpp
parentc680cb6c5832592e6337493403fcdb1a5e002e9a (diff)
Add an option to re-cloak opers on logout.
Closes: #421
Diffstat (limited to 'modules/hostserv/hostserv.cpp')
-rw-r--r--modules/hostserv/hostserv.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/hostserv/hostserv.cpp b/modules/hostserv/hostserv.cpp
index 39b49ec29..82273f4e5 100644
--- a/modules/hostserv/hostserv.cpp
+++ b/modules/hostserv/hostserv.cpp
@@ -79,6 +79,12 @@ public:
this->OnUserLogin(u);
}
+ void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) override
+ {
+ if (mname == "OPER" && Config->GetModule(this)->Get<bool>("activate_on_deoper", "yes"))
+ this->OnUserLogin(u);
+ }
+
EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params) override
{
if (!params.empty() || source.c || source.service != *HostServ)