From: pk910 Date: Sat, 10 Dec 2011 08:44:45 +0000 (+0100) Subject: fixed cmd_myaccess: do not show channels from inactive bots X-Git-Tag: v5.3~154 X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=04f57d450dd94573199e66737fa9db5296fbcd18 fixed cmd_myaccess: do not show channels from inactive bots --- diff --git a/src/cmd_neonserv_myaccess.c b/src/cmd_neonserv_myaccess.c index 0ab6418..8c7dd14 100644 --- a/src/cmd_neonserv_myaccess.c +++ b/src/cmd_neonserv_myaccess.c @@ -135,7 +135,7 @@ static void neonserv_cmd_myaccess_async1(struct ClientSocket *client, struct Cli if ((user_row = mysql_fetch_row(res)) != NULL) { userid = atoi(user_row[0]); //check if the user is already added - printf_mysql_query("SELECT `chanuser_access`, `chanuser_flags`, `chanuser_infoline`, `channel_name`, `channel_getop`, `channel_getvoice`, `botid` FROM `chanusers` LEFT JOIN `channels` ON `chanuser_cid` = `channel_id` LEFT JOIN `bot_channels` ON `chanuser_cid` = `chanid` LEFT JOIN `bots` ON `bots`.`id` = `botid` WHERE `chanuser_uid` = '%d' AND `botclass` = '%d' ORDER BY `chanuser_access` DESC, `channel_name` ASC", userid, client->botid); + printf_mysql_query("SELECT `chanuser_access`, `chanuser_flags`, `chanuser_infoline`, `channel_name`, `channel_getop`, `channel_getvoice`, `botid` FROM `chanusers` LEFT JOIN `channels` ON `chanuser_cid` = `channel_id` LEFT JOIN `bot_channels` ON `chanuser_cid` = `chanid` LEFT JOIN `bots` ON `bots`.`id` = `botid` WHERE `chanuser_uid` = '%d' AND `botclass` = '%d' AND `active` = '1' ORDER BY `chanuser_access` DESC, `channel_name` ASC", userid, client->botid); res = mysql_use(); total_count = mysql_num_rows(res); table = table_init(4, total_count + 1, 0);