void acid_reload(const char *reason) { close_log(); init_log() ; info_log("Reload: %s\n",reason) ; read_user_data(); }
int main(int UNUSED(argc), char * UNUSED(argv[])) { if ((botinfo = malloc(sizeof(struct botstruct))) == NULL) { fprintf(stderr, "main: Malloc error!\n"); acid_shutdown(-1); } time(&currtime); time(&botinfo->starttime); startup(); if(botinfo->ver == NULL) { botinfo->ver = malloc(50) ; snprintf(botinfo->ver, 50, "Acidblood %s\n",VERSION) ; } /* load user data */ if ((read_user_data()) < 0) { fprintf(stderr, "Error reading in user file.\n"); acid_shutdown(-1); } background() ; while (1) { time(&currtime); CheckConfServers() ; check_connections(); CheckTimers() ; ReapUserList(); } }
void user_init_database() { read_user_data(); read_frineds_data(); }