diff options
author | Adam <Adam@anope.org> | 2012-10-29 21:28:43 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-29 21:28:43 -0400 |
commit | 7bdad857e4c85e46a2ac18045046f5ec4bd701d8 (patch) | |
tree | eea33b1fcdd2755bcb5e98648245c57a96732da3 | |
parent | c2a8ad26af83b069693e84d0fe32d1549029d5f0 (diff) |
Only show mode lock in /cs info if there really is a mode lock
-rw-r--r-- | modules/commands/cs_info.cpp | 5 |
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); |