exit(0);
}
check_firstrun();
+ char **modulelist = get_all_fieldnames("modules");
+ if(!modulelist || !modulelist[0]) {
+ fprintf(stderr, "no modules loaded... Please update your configuration!\n");
+ exit(0);
+ }
+ free(modulelist);
if (run_as_daemon) {
#ifndef WIN32
/* Attempt to fork into the background if daemon mode is on. */
printf_mysql_query("SELECT `user_id`, `user_registered` FROM `users` WHERE `user_user` = '%s'", escape_string(auth));
res = mysql_use();
if ((row = mysql_fetch_row(res)) != NULL) {
- if(!exists || (strcmp(row[1], "0") && registered != atoi(row[1]))) {
+ int diff = registered - atoi(row[1]);
+ if(diff < 0)
+ diff *= -1;
+ if(!exists || (strcmp(row[1], "0") && diff > 86400)) {
//User is no longer valid! Delete it...
deleteUser(atoi(row[0]));
char *alertchan = get_string_field("General.CheckAuths.alertchan");