fixed upall channel loop
authorpk910 <philipp@zoelle1.de>
Tue, 23 Aug 2011 23:13:43 +0000 (01:13 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 23 Aug 2011 23:13:43 +0000 (01:13 +0200)
cmd_neonserv_upall.c

index 4cb20606d94f6057561691778a426a4f59a9f7c1..18d4db31e651b21b8bd5dcab5be9e4011a0c4869 100644 (file)
@@ -15,7 +15,7 @@ static CMD_BIND(neonserv_cmd_upall) {
         return;
     userid = atoi(row[0]);
     printf_mysql_query("SELECT `chanuser_access`, `channel_getop`, `channel_getvoice`, `channel_name`, `channel_id` FROM `chanusers` LEFT JOIN `channels` ON `chanuser_cid` = `channel_id` WHERE `chanuser_cid` = '%s'", user->auth);
-    while ((row = mysql_fetch_row(res)) == NULL) {
+    while ((row = mysql_fetch_row(res)) != NULL) {
         chan = getChanByName(row[3]);
         if(!chan) continue;
         printf_mysql_query("SELECT `botid` FROM `bot_channels` LEFT JOIN `bots` ON `bot_channels`.`botid` = `bots`.`id` WHERE `chanid` = '%s' AND `botclass` = '%d'", row[4], client->botid);