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);