Merge branch 'master' into IOMultiplexer
[NeonServV5.git] / src / modules / NeonBackup.mod / bot_NeonBackup.c
index b16c387eccab83927dff99e0be18866ccaba84d6..f9d82616d3dfe7cf613374cce9379fc747d0087e 100644 (file)
@@ -88,7 +88,7 @@ static void start_bots(int type) {
     MYSQL_ROW row;
     
     if(type == MODSTATE_STARTSTOP) {
-        printf_mysql_query("SELECT `nick`, `ident`, `realname`, `server`, `port`, `pass`, `textbot`, `id`, `queue`, `ssl`, `bind` FROM `bots` WHERE `botclass` = '%d' AND `active` = '1'", BOTID);
+        printf_mysql_query("SELECT `nick`, `ident`, `realname`, `server`, `port`, `pass`, `textbot`, `id`, `queue`, `ssl`, `bind`, `secret` FROM `bots` WHERE `botclass` = '%d' AND `active` = '1'", BOTID);
         res = mysql_use();
         
         while ((row = mysql_fetch_row(res)) != NULL) {
@@ -96,6 +96,7 @@ static void start_bots(int type) {
             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->flags |= SOCKET_FLAG_REQUEST_INVITE | SOCKET_FLAG_REQUEST_OP;
             client->botid = BOTID;
             client->clientid = atoi(row[7]);