From 1a3d9a016d3adc49788bbff73aac9b3b5ea85b17 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 1 Jul 2013 22:17:52 -0400 Subject: Change extensible keys to require explicitly having a type defined for it. Completely modularize more features like bs_kick, entrymsg, log, mode, etc. Move fantasy to its own module. Move greet to its own module. --- modules/commands/cs_info.cpp | 45 -------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'modules/commands/cs_info.cpp') diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 0d3623c00..8f910fc83 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -13,17 +13,6 @@ class CommandCSInfo : public Command { - void CheckOptStr(Anope::string &buf, const Anope::string &opt, const char *str, const ChannelInfo *ci, const NickCore *nc) - { - if (ci->HasExt(opt)) - { - if (!buf.empty()) - buf += ", "; - - buf += Language::Translate(nc, str); - } - } - public: CommandCSInfo(Module *creator) : Command(creator, "chanserv/info", 1, 2) { @@ -66,43 +55,9 @@ class CommandCSInfo : public Command info["Registered"] = Anope::strftime(ci->time_registered); info["Last used"] = Anope::strftime(ci->last_used); - const ModeLock *secret = ci->GetMLock("SECRET"); - if (!ci->last_topic.empty() && (show_all || ((!secret || secret->set == false) && (!ci->c || !ci->c->HasMode("SECRET"))))) - { - info["Last topic"] = ci->last_topic; - info["Topic set by"] = ci->last_topic_setter; - } - if (show_all) { info["Ban type"] = stringify(ci->bantype); - - Anope::string optbuf; - CheckOptStr(optbuf, "KEEPTOPIC", _("Topic Retention"), ci, nc); - CheckOptStr(optbuf, "PEACE", _("Peace"), ci, nc); - CheckOptStr(optbuf, "PRIVATE", _("Private"), ci, nc); - CheckOptStr(optbuf, "RESTRICTED", _("Restricted Access"), ci, nc); - CheckOptStr(optbuf, "SECURE", _("Secure"), ci, nc); - CheckOptStr(optbuf, "SECUREFOUNDER", _("Secure Founder"), ci, nc); - CheckOptStr(optbuf, "SECUREOPS", _("Secure Ops"), ci, nc); - if (ci->HasExt("SIGNKICK")) - CheckOptStr(optbuf, "SIGNKICK", _("Signed kicks"), ci, nc); - else - CheckOptStr(optbuf, "SIGNKICK_LEVEL", _("Signed kicks"), ci, nc); - CheckOptStr(optbuf, "TOPICLOCK", _("Topic Lock"), ci, nc); - CheckOptStr(optbuf, "PERSIST", _("Persistent"), ci, nc); - CheckOptStr(optbuf, "NO_EXPIRE", _("No expire"), ci, nc); - CheckOptStr(optbuf, "STATS", _("Chanstats"), ci, nc); - - info["Options"] = optbuf.empty() ? _("None") : optbuf; - - const Anope::string &ml = ci->GetMLockAsString(true); - if (!ml.empty()) - info["Mode lock"] = ml; - - 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); } FOREACH_MOD(OnChanInfo, (source, ci, info, show_all)); -- cgit