added bot/ircop mark to cmd_nicklist
[NeonServV5.git] / src / bots.c
index f1bfea843a4b777fe1a8ca91f9915539c79a40ff..ef55ef656e1b78b4a3c4c7c9255f647496559e80 100644 (file)
@@ -1,4 +1,4 @@
-/* bots.c - NeonServ v5.4
+/* 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,6 +25,7 @@
 #include "version.h"
 #include "modcmd.h"
 #include "DBHelper.h"
+#include "IRCEvents.h"
 
 struct cmd_bot_alias {
     int botid;
@@ -39,7 +40,7 @@ static void start_zero_bots() {
     MYSQL_RES *res, *res2;
     MYSQL_ROW row;
     
-    printf_mysql_query("SELECT `nick`, `ident`, `realname`, `server`, `port`, `pass`, `textbot`, `id`, `queue`, `ssl`, `bind` FROM `bots` WHERE `botclass` = '0' AND `active` = '1'");
+    printf_mysql_query("SELECT `nick`, `ident`, `realname`, `server`, `port`, `pass`, `textbot`, `id`, `queue`, `ssl`, `bind`, `secret` FROM `bots` WHERE `botclass` = '0' AND `active` = '1'");
     res = mysql_use();
     
     while ((row = mysql_fetch_row(res)) != NULL) {
@@ -47,6 +48,7 @@ static void start_zero_bots() {
         client->flags |= (strcmp(row[6], "0") ? SOCKET_FLAG_PREFERRED : 0);
         client->flags |= (strcmp(row[8], "0") ? SOCKET_FLAG_USE_QUEUE : 0);
         client->flags |= (strcmp(row[9], "0") ? SOCKET_FLAG_SSL : 0);
+        client->flags |= (strcmp(row[11], "0") ? SOCKET_FLAG_SECRET_BOT : 0);
         client->botid = 0;
         client->clientid = atoi(row[7]);
         connect_socket(client);