userid = atoi(row[0]);
} else {
printf_mysql_query("INSERT INTO `users` (`user_user`) VALUES ('%s')", escape_string(auth));
- userid = (int) mysql_insert_id(mysql_conn);
+ userid = (int) mysql_insert_id(get_mysql_conn());
}
}
if(client->botid)
printf_mysql_query("UPDATE `channels` SET `channel_registered` = UNIX_TIMESTAMP(), `channel_registrator` = '%d' WHERE `channel_id` = '%d'", adminid, chanid);
} else {
printf_mysql_query("INSERT INTO `channels` (`channel_name`, `channel_registered`, `channel_registrator`) VALUES ('%s', UNIX_TIMESTAMP(), '%d')", escape_string(channel), adminid);
- chanid = (int) mysql_insert_id(mysql_conn);
+ chanid = (int) mysql_insert_id(get_mysql_conn());
}
struct ClientSocket *bot;
for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {