*** VERSION 5.4.0 ***
[NeonServV5.git] / src / DBHelper.c
index 20037156cab4819c9c22bd14572393f29170f8e9..cfcdd20eab128d79fde135e7f3ec133e1ba182cf 100644 (file)
@@ -1,4 +1,4 @@
-/* DBHelper.c - NeonServ v5.3
+/* DBHelper.c - NeonServ v5.4
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -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)) {