fixed cmd_upall
authorpk910 <philipp@zoelle1.de>
Tue, 23 Aug 2011 23:23:43 +0000 (01:23 +0200)
committerpk910 <philipp@zoelle1.de>
Tue, 23 Aug 2011 23:29:11 +0000 (01:29 +0200)
cmd_neonserv_upall.c

index 18d4db31e651b21b8bd5dcab5be9e4011a0c4869..f23d96dbddda361156b4fc4d55b3b4b5ce81ca74 100644 (file)
@@ -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;