added "nowho" parameter to debug userlist and fixed memory leak in DBHelper.c
[NeonServV5.git] / src / cmd_neonhelp_requests.c
index 5c23f8c26c77811ea06d86148cdf79c7bcaea98e..b95a4b441a6b3a79043c9dedd65aa69d04b3d27b 100644 (file)
@@ -57,7 +57,7 @@ CMD_BIND(neonhelp_cmd_requests) {
         return;
     }
     struct Table *table;
-    printf_mysql_query("SELECT `id`, `time`, `text` FROM `helpserv_requests` WHERE `botid` = '%d' ORDER BY `time` DESC", client->clientid);
+    printf_mysql_query("SELECT `id`, `time`, `text` FROM `helpserv_requests` WHERE `botid` = '%d' AND `status` != 2 ORDER BY `time` DESC", client->clientid);
     res = mysql_use();
     table = table_init(5, mysql_num_rows(res) + 1, 0);
     char *content[5];
@@ -104,4 +104,5 @@ CMD_BIND(neonhelp_cmd_requests) {
     }
     if(table->entrys == 1)
         reply(getTextBot(), user, "NS_TABLE_NONE");
+    table_free(table);
 }