From 945133b242c0f336caa2630f05504e246b3f22e7 Mon Sep 17 00:00:00 2001 From: pk910 Date: Wed, 24 Aug 2011 01:23:43 +0200 Subject: [PATCH] fixed cmd_upall --- cmd_neonserv_upall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd_neonserv_upall.c b/cmd_neonserv_upall.c index 18d4db3..f23d96d 100644 --- a/cmd_neonserv_upall.c +++ b/cmd_neonserv_upall.c @@ -14,7 +14,8 @@ static CMD_BIND(neonserv_cmd_upall) { if ((row = mysql_fetch_row(res)) == NULL) 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); + 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_uid` = '%d'", userid); + res = mysql_use(); while ((row = mysql_fetch_row(res)) != NULL) { chan = getChanByName(row[3]); if(!chan) continue; -- 2.20.1