summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-13 20:35:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-13 20:35:13 +0300
commit14bdb4e7b61094080c8eddd2efe9a9cc55d08190 (patch)
treed4134f0037a8993fa5906a0b0213b2a1845ed5d4
parent94daf7aa79e61eb97a7f172c32d4738f5aaa05d1 (diff)
downloadplus-14bdb4e7b61094080c8eddd2efe9a9cc55d08190.tar.gz
plus-14bdb4e7b61094080c8eddd2efe9a9cc55d08190.tar.bz2
plus-14bdb4e7b61094080c8eddd2efe9a9cc55d08190.tar.xz
plus-14bdb4e7b61094080c8eddd2efe9a9cc55d08190.zip
Show warning for lastseen chat command if id and seen colleciton disabled.
-rw-r--r--src/actions/actions.cpp16
1 files changed, 12 insertions, 4 deletions
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))