Procházet zdrojové kódy

* Detect MONITOR on connect and set use_monitor if available

Bryan Drewery před 16 roky
rodič
revize
5497dd59bb
2 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 1 0
      src/mod/server.mod/server.c
  2. 3 0
      src/mod/server.mod/servmsg.c

+ 1 - 0
src/mod/server.mod/server.c

@@ -75,6 +75,7 @@ bool keepnick = 1;		/* keep trying to regain my intended
 static bool nick_juped = 0;	/* True if origbotname is juped(RPL437) (dw) */
 static bool jnick_juped = 0;    /* True if jupenick is juped */
 bool tried_jupenick = 0;
+bool use_monitor = 0;
 static bool waiting_for_awake;	/* set when i unidle myself, cleared when I get the response */
 time_t server_online;	/* server connection time */
 char botrealname[121] = "A deranged product of evil coders.";	/* realname of bot */

+ 3 - 0
src/mod/server.mod/servmsg.c

@@ -288,6 +288,8 @@ got005(char *from, char *msg)
         modesperline = MODES_PER_LINE_MAX;
     } else if (!strcasecmp(tmp, "NICKLEN"))
       nick_len = atoi(p);
+    else if (!strcasecmp(tmp, "MONITOR"))
+      use_monitor = 1;
     else if (!strcasecmp(tmp, "NETWORK"))
       strlcpy(curnetwork, p, 120);
     else if (!strcasecmp(tmp, "PENALTY"))
@@ -1675,6 +1677,7 @@ static void connect_server(void)
     tried_jupenick = 0;
     rolls = 0;
     altnick_char = 0;
+    use_monitor = 0;
 
     for (chan = chanset; chan; chan = chan->next)
       chan->status &= ~CHAN_JUPED;