summaryrefslogtreecommitdiff
path: root/src/map/chrif.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-04-09 17:59:01 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-04-11 14:21:42 -0700
commit8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7 (patch)
tree407e8fb0258440c6dd60cca98b6304fb946eba70 /src/map/chrif.cpp
parent756085f91d0f01c69550735cf2e60cae54d9c72a (diff)
downloadtmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.gz
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.bz2
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.xz
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.zip
Also implement x32 support
Diffstat (limited to 'src/map/chrif.cpp')
-rw-r--r--src/map/chrif.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/chrif.cpp b/src/map/chrif.cpp
index 9743072..47eef1a 100644
--- a/src/map/chrif.cpp
+++ b/src/map/chrif.cpp
@@ -880,13 +880,11 @@ int chrif_accountban(int fd)
}
}
else if (RFIFOB(fd, 6) == 1)
- { // 0: change of statut, 1: ban
- time_t timestamp;
- char tmpstr[2048];
- timestamp = (time_t) RFIFOL(fd, 7); // status or final date of a banishment
- strcpy(tmpstr, "Your account has been banished until ");
- strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S",
- gmtime(&timestamp));
+ {
+ // 0: change of statut, 1: ban
+ TimeT timestamp = static_cast<time_t>(RFIFOL(fd, 7)); // status or final date of a banishment
+ char tmpstr[] = WITH_TIMESTAMP("Your account has been banished until ");
+ REPLACE_TIMESTAMP(tmpstr, timestamp);
clif_displaymessage(sd->fd, tmpstr);
}
clif_setwaitclose(sd->fd); // forced to disconnect for the change
@@ -1098,7 +1096,7 @@ void chrif_parse(int fd)
break;
case 0x2afd:
pc_authok(RFIFOL(fd, 4), RFIFOL(fd, 8),
- (time_t) RFIFOL(fd, 12), RFIFOW(fd, 16),
+ static_cast<time_t>(RFIFOL(fd, 12)), RFIFOW(fd, 16),
(const struct mmo_charstatus *) RFIFOP(fd, 18));
break;
case 0x2afe: