Skip to content
Snippets Groups Projects
Commit 642986c2 authored by rswindell's avatar rswindell
Browse files

Bug-fix: getuserdat() automatically calls resetdailyuserdat() when the laston

date is not the current date (thus resetting all daily stats like logons today,
posts today, etc.) - but resetdailyuserdat() failed to save the reset stats
to the user.dat file because user->number was 0 at this point in getuserdat().

This bug (reported by Finnigann) only effected non-BBS servers (like FTP, HTTP,
etc.) since the BBS has its own checking of a new day and resetting of the
daily stats for the user during logon (in logon.cpp).
parent 265db90a
No related branches found
No related tags found
No related merge requests found
......@@ -343,6 +343,8 @@ int DLLCALL getuserdat(scfg_t* cfg, user_t *user)
getrec(userdat,U_CHAT,8,str);
user->chat=ahtoul(str);
user->number=user_number; /* Signal of success */
/* Reset daily stats if not logged on today */
unixtodstr(cfg, time(NULL),str);
unixtodstr(cfg, user->laston,tmp);
......@@ -367,7 +369,6 @@ int DLLCALL getuserdat(scfg_t* cfg, user_t *user)
}
}
#endif
user->number=user_number; /* Signal of success */
return(0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment