added output limit for cmd_history
authorpk910 <philipp@zoelle1.de>
Thu, 26 Jul 2012 15:20:13 +0000 (17:20 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 26 Jul 2012 15:20:13 +0000 (17:20 +0200)
src/modules/NeonHelp.mod/cmd_neonhelp_history.c

index 2378d5a7be336e7133ec2566620947b46731215d..208418a72dda80c0727e2ca82b16f1f390c9362b 100644 (file)
@@ -58,7 +58,7 @@ CMD_BIND(neonhelp_cmd_history) {
     }
     struct Table *table;
     char *match_str = escape_string(argv[0]);
-    printf_mysql_query("SELECT `id`, `nick`, `hand`, `host`, `time`, `text`, `status`, `supporter`, `users`.`user_user`, MD5(CONCAT(`id`, `host`, `time`, `supporter`)) FROM `helpserv_requests` LEFT JOIN `users` ON `supporter` = `user_id` WHERE `botid` = '%d' AND (`host` LIKE '%%%s%%' OR `hand` LIKE '%%%s%%' OR `nick` LIKE '%%%s%%') ORDER BY `time` ASC", client->clientid, match_str, match_str, match_str);
+    printf_mysql_query("SELECT `id`, `nick`, `hand`, `host`, `time`, `text`, `status`, `supporter`, `users`.`user_user`, MD5(CONCAT(`id`, `host`, `time`, `supporter`)) FROM `helpserv_requests` LEFT JOIN `users` ON `supporter` = `user_id` WHERE `botid` = '%d' AND (`host` LIKE '%%%s%%' OR `hand` LIKE '%%%s%%' OR `nick` LIKE '%%%s%%') ORDER BY `time` ASC LIMIT 100", client->clientid, match_str, match_str, match_str);
     res = mysql_use();
     table = table_init(6, mysql_num_rows(res)*3 + 1, 0);
     table->col_flags[1] |= TABLE_FLAG_COL_SKIP_NULL;