summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-03 18:59:33 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-03 18:59:33 +0300
commitfd27023f66223f860715aecbb8660a1d6a1e0d7a (patch)
treead1f93dc3168ef61ceb7079ce1e5b93bb65795c4 /src/actormanager.cpp
parent0928d201335e8c247a44a1406cfbee3921ee7901 (diff)
downloadmanaverse-fd27023f66223f860715aecbb8660a1d6a1e0d7a.tar.gz
manaverse-fd27023f66223f860715aecbb8660a1d6a1e0d7a.tar.bz2
manaverse-fd27023f66223f860715aecbb8660a1d6a1e0d7a.tar.xz
manaverse-fd27023f66223f860715aecbb8660a1d6a1e0d7a.zip
Also store last seen for each player.
Actually first seen for current session.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index a250fba35..b569d6b99 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1973,12 +1973,20 @@ void ActorManager::updateNameId(const std::string &name,
{
mIdName[beingId].insert(name);
std::string dir = settings.usersIdDir;
- dir.append(toString(id));
+ const std::string idStr = toString(id);
+ dir.append(idStr);
dir.append("/");
dir.append(stringToHexPath(name));
+ const std::string dateStr = getDateString();
Files::saveTextFile(dir,
"info.txt",
- (name + "\n").append(getDateString()));
+ (name + "\n").append(dateStr));
+
+ dir = settings.usersDir;
+ dir.append(stringToHexPath(name));
+ Files::saveTextFile(dir,
+ "seen.txt",
+ (name + "\n").append(idStr).append("\n").append(dateStr));
}
}