summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-29 21:28:43 -0400
committerAdam <Adam@anope.org>2012-10-29 21:28:43 -0400
commit7bdad857e4c85e46a2ac18045046f5ec4bd701d8 (patch)
treeeea33b1fcdd2755bcb5e98648245c57a96732da3
parentc2a8ad26af83b069693e84d0fe32d1549029d5f0 (diff)
Only show mode lock in /cs info if there really is a mode lock
-rw-r--r--modules/commands/cs_info.cpp5
1 files changed, 4 insertions, 1 deletions
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);