summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/nickserv/ns_set_protect.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/nickserv/ns_set_protect.cpp b/modules/nickserv/ns_set_protect.cpp
index 12c995486..af4f37e0a 100644
--- a/modules/nickserv/ns_set_protect.cpp
+++ b/modules/nickserv/ns_set_protect.cpp
@@ -157,11 +157,16 @@ public:
void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) override
{
- if (!show_hidden)
+ if (!protect.HasExt(na->nc))
return;
- if (protect.HasExt(na->nc))
- info.AddOption(_("Protection"));
+ info.AddOption(_("Protection"));
+ if (show_hidden)
+ {
+ auto protectafter = na->nc->GetExt<time_t>("PROTECT_AFTER");
+ auto protect = protectafter ? *protectafter : Config->GetModule("nickserv").Get<time_t>("defaultprotect", "1m");
+ info[_("Protection after")] = Anope::Duration(protect, source.GetAccount());
+ }
}
};