Skip to content

Commit 9cb8a93

Browse files
bug fix - last online time does not saved
1 parent d65256e commit 9cb8a93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/user_index.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ class useritem{
467467
last_online_time = time(0);
468468
if(user_id > 0)
469469
{
470-
local_buf->db.query_format("replace into `users_time` (`user_id`, `time`) VALUES ('%d', '%d', '%d')", user_id, last_online_time);
470+
local_buf->db.query_format("replace into `users_time` (`user_id`, `time`) VALUES ('%d', '%d')", user_id, last_online_time);
471471
char pipe_name[100];
472472
snprintf(pipe_name, 100,"user_status_%d", user_id);
473473
internalApi::send_event_to_pipe(local_buf, pipe_name, "{\\\"data\\\":\\\"offline\\\",\\\"event_name\\\":\\\"offline\\\"}", NULL);
@@ -483,7 +483,7 @@ class useritem{
483483
last_online_time = 0;
484484
if(user_id > 0)
485485
{
486-
local_buf->db.query_format("replace into `users_time` (`user_id`, `time`) VALUES ('%d', '%d', 0)", user_id); // Подусать может этот запрос не нужен
486+
local_buf->db.query_format("replace into `users_time` (`user_id`, `time`) VALUES ('%d', 0)", user_id); // Подусать может этот запрос не нужен
487487
char pipe_name[100];
488488
snprintf(pipe_name, 100, "user_status_%d", user_id);
489489
internalApi::send_event_to_pipe(local_buf, pipe_name, "{\\\"data\\\":\\\"online\\\",\\\"event_name\\\":\\\"online\\\"}", NULL);

0 commit comments

Comments
 (0)