From 14bdb4e7b61094080c8eddd2efe9a9cc55d08190 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 13 Feb 2016 20:35:13 +0300 Subject: Show warning for lastseen chat command if id and seen colleciton disabled. --- src/actions/actions.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index a7289e300..270230463 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1725,16 +1725,24 @@ impHandler(seen) if (!actorManager) return false; - const std::string name = event.args; - if (name.empty()) - return false; - ChatTab *tab = event.tab; if (!tab) tab = localChatTab; if (!tab) return false; + if (config.getBoolValue("enableIdCollecting") == false) + { + tab->chatLog(_("Last seen disabled. " + "Enable in players / collect players id and seen log."), + ChatMsgType::BY_SERVER); + return true; + } + + const std::string name = event.args; + if (name.empty()) + return false; + std::string dir = settings.usersDir; dir.append(stringToHexPath(name)).append("/seen.txt"); if (Files::existsLocal(dir)) -- cgit v1.2.3-60-g2f50