From 7bdad857e4c85e46a2ac18045046f5ec4bd701d8 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 29 Oct 2012 21:28:43 -0400 Subject: [PATCH] Only show mode lock in /cs info if there really is a mode lock --- modules/commands/cs_info.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 591a0f673..310879135 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -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);