From 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 5 May 2013 01:55:04 -0400 Subject: Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. --- modules/commands/cs_info.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_info.cpp') diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index a686541be..e26dc1970 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -13,6 +13,8 @@ #include "module.h" +static ServiceReference 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("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")) { -- cgit