summaryrefslogtreecommitdiff
path: root/modules/commands/cs_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_info.cpp')
-rw-r--r--modules/commands/cs_info.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp
index 9485e81fd..e26dc1970 100644
--- a/modules/commands/cs_info.cpp
+++ b/modules/commands/cs_info.cpp
@@ -13,6 +13,8 @@
#include "module.h"
+static ServiceReference<ChanServService> chanserv("ChanServService", "ChanServ");
+
class CommandCSInfo : public Command
{
void CheckOptStr(Anope::string &buf, const Anope::string &opt, const char *str, const ChannelInfo *ci, const NickCore *nc)
@@ -102,8 +104,9 @@ class CommandCSInfo : public Command
if (!ml.empty())
info["Mode lock"] = ml;
- if (!ci->HasExt("NO_EXPIRE"))
- info["Expires on"] = Anope::strftime(ci->last_used + Config->CSExpire);
+ time_t chanserv_expire = Config->GetModule("chanserv")->Get<time_t>("expire", "14d");
+ if (!ci->HasExt("NO_EXPIRE") && chanserv_expire && !Anope::NoExpire)
+ info["Expires on"] = Anope::strftime(ci->last_used + chanserv_expire);
}
if (ci->HasExt("SUSPENDED"))
{
@@ -142,10 +145,9 @@ class CSInfo : public Module
CommandCSInfo commandcsinfo;
public:
- CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE),
+ CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR),
commandcsinfo(this)
{
- this->SetAuthor("Anope");
}
};