X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2FDBHelper.c;h=56bd924e41f2bb2c2e22add62265ad505ef0f2c4;hb=0def65a9df6d9a295c064cba58af229b326f39fe;hp=9fa6c1cad7a2a7ba460ea3899f14fafde6d9bc95;hpb=b53d0c5f88063f075a48a0426f9d5d6b3490b9fc;p=NeonServV5.git diff --git a/src/DBHelper.c b/src/DBHelper.c index 9fa6c1c..56bd924 100644 --- a/src/DBHelper.c +++ b/src/DBHelper.c @@ -287,7 +287,7 @@ static int event_user_registered(struct UserNode *old_user, struct UserNode *new } cache->new_user = new_user; cache->oldauth = strdup(oldauth); - lookup_authname(newauth, event_user_registered_auth_lookup, cache); + lookup_authname(newauth, 0, event_user_registered_auth_lookup, cache); } return 1; } @@ -314,7 +314,7 @@ void deleteUser(int userid) { //unregister channel printf_mysql_query("SELECT `botid`, `channel_name` FROM `bot_channels` LEFT JOIN `channels` ON `chanid` = `channel_id` WHERE `chanid` = '%s' AND `suspended` = '0'", row[1]); res2 = mysql_use(); - while((row2 = mysql_fetch_row(res))) { + while((row2 = mysql_fetch_row(res2))) { struct ClientSocket *bot; int clientid = atoi(row2[0]); for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) { @@ -343,6 +343,6 @@ void deleteUser(int userid) { } void init_DBHelper() { - bind_registered(event_user_registered); + bind_registered(event_user_registered, 0); }