1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 01:03:13 +02:00

Only show mode lock in /cs info if there really is a mode lock

This commit is contained in:
Adam
2012-10-29 21:28:43 -04:00
parent c2a8ad26af
commit 7bdad857e4
+4 -1
View File
@@ -97,7 +97,10 @@ class CommandCSInfo : public Command
CheckOptStr(optbuf, CI_STATS, _("Chanstats"), ci, nc);
info["Options"] = optbuf.empty() ? _("None") : optbuf;
info["Mode lock"] = ci->GetMLockAsString(true);
const Anope::string &ml = ci->GetMLockAsString(true);
if (!ml.empty())
info["Mode lock"] = ml;
if (!ci->HasFlag(CI_NO_EXPIRE))
info["Expires on"] = do_strftime(ci->last_used + Config->CSExpire);