Merge branch 'development'
[NeonServV5.git] / src / modules / NeonServ.mod / cmd_neonserv_set.c
index 2b78097fadad03e71d170ac9462bd2e2fc14503f..e47b334b71ca2c82da5bc81a392c4e88b886a617 100644 (file)
@@ -246,7 +246,7 @@ CMD_BIND(neonserv_cmd_set) {
         }
         char **table_lines = table_end(table);
         for(i = 0; i < table->entrys; i++) {
-            reply(textclient, user, table_lines[i]);
+            reply(textclient, user, "%s", table_lines[i]);
         }
         table_free(table);
     }
@@ -368,9 +368,9 @@ static char* neonserv_cmd_set_trigger(struct ClientSocket *client, struct Client
     MYSQL_RES *res;
     MYSQL_ROW row;
     if(client->botid)
-        printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, client->botid);
+        printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `bot_channels`.`id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botclass` = '%d'", chan->channel_id, client->botid);
     else
-        printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid);
+        printf_mysql_query("SELECT `trigger`, `defaulttrigger`, `bot_channels`.`id` FROM `bot_channels` LEFT JOIN `bots` ON `botid` = `bots`.`id` WHERE `chanid` = '%d' AND `botid` = '%d'", chan->channel_id, client->clientid);
     res = mysql_use();
     row = mysql_fetch_row(res);
     trigger = (row[0] ? row[0] : row[1]);