summaryrefslogtreecommitdiff
path: root/src/map/pc.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/pc.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/pc.cpp')
-rw-r--r--src/map/pc.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index a344839..232a767 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -615,7 +615,7 @@ int pc_isequip(struct map_session_data *sd, int n)
* char鯖から送られてきたステータスを設定
*------------------------------------------
*/
-int pc_authok(int id, int login_id2, time_t connect_until_time,
+int pc_authok(int id, int login_id2, TimeT connect_until_time,
short tmw_version, const struct mmo_charstatus *st)
{
struct map_session_data *sd = NULL;
@@ -783,24 +783,27 @@ int pc_authok(int id, int login_id2, time_t connect_until_time,
sd->auto_ban_info.in_progress = 0;
// Initialize antispam vars
- sd->chat_reset_due = sd->chat_lines_in = sd->chat_total_repeats =
- sd->chat_repeat_reset_due = 0;
+ sd->chat_reset_due = TimeT();
+ sd->chat_lines_in = sd->chat_total_repeats = 0;
+ sd->chat_repeat_reset_due = TimeT();
sd->chat_lastmsg[0] = '\0';
memset(sd->flood_rates, 0, sizeof(sd->flood_rates));
- sd->packet_flood_reset_due = sd->packet_flood_in = 0;
+ sd->packet_flood_reset_due = TimeT();
+ sd->packet_flood_in = 0;
// Obtain IP address (if they are still connected)
if (!getpeername(sd->fd, (struct sockaddr *)&sai, &sa_len))
sd->ip = sai.sin_addr;
// message of the limited time of the account
- if (connect_until_time != 0)
- { // don't display if it's unlimited or unknow value
- char tmpstr[1024];
- strftime(tmpstr, sizeof(tmpstr) - 1, "Your account time limit is: %d-%m-%Y %H:%M:%S.", gmtime(&connect_until_time));
- clif_wis_message(sd->fd, wisp_server_name, tmpstr,
- strlen(tmpstr) + 1);
+ if (connect_until_time)
+ {
+ // don't display if it's unlimited or unknow value
+ char tmpstr[] = WITH_TIMESTAMP("Your account time limit is: ");
+ REPLACE_TIMESTAMP(tmpstr, connect_until_time);
+
+ clif_wis_message(sd->fd, wisp_server_name, tmpstr, sizeof(tmpstr));
}
pc_calcstatus(sd, 1);