added bot/ircop mark to cmd_nicklist
[NeonServV5.git] / src / modules / global.mod / cmd_global_bots.c
index 57ab15384ac2dacdcaabc7b4742e1898139a6ae4..c4d345d774a376e03039fc5b1420c08f77b1e52d 100644 (file)
@@ -1,4 +1,4 @@
-/* cmd_global_bots.c - NeonServ v5.3
+/* cmd_global_bots.c - NeonServ v5.5
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -25,7 +25,7 @@ CMD_BIND(global_cmd_bots) {
     struct Table *table;
     MYSQL_RES *res, *res2;
     MYSQL_ROW row, row2;
-    printf_mysql_query("SELECT `active`, `nick`, `server`, `port`, `pass`, `botclass`, `textbot`, `queue`, `defaulttrigger`, `max_channels`, `register_priority`, `id` FROM `bots`");
+    printf_mysql_query("SELECT `active`, `nick`, `server`, `port`, `pass`, `botclass`, `textbot`, `queue`, `defaulttrigger`, `max_channels`, `register_priority`, `id`, `secret` FROM `bots`");
     res = mysql_use();
     table = table_init(7, mysql_num_rows(res) + 1, 0);
     char *content[7];
@@ -54,6 +54,8 @@ CMD_BIND(global_cmd_bots) {
             botflags[flagspos++] = 't';
         if(!strcmp(row[7], "1"))
             botflags[flagspos++] = 'q';
+        if(!strcmp(row[12], "1"))
+            botflags[flagspos++] = 's';
         botflags[flagspos] = '\0';
         content[4] = botflags;
         printf_mysql_query("SELECT COUNT(*) FROM `bot_channels` WHERE `botid` = '%s'", row[11]);
@@ -67,7 +69,7 @@ CMD_BIND(global_cmd_bots) {
     char **table_lines = table_end(table);
     int i;
     for(i = 0; i < table->entrys; i++) {
-        reply(getTextBot(), user, table_lines[i]);
+        reply(textclient, user, table_lines[i]);
     }
     table_free(table);
 }
\ No newline at end of file