Explorar o código

Merge branch '176-server-port'

* 176-server-port:
  * Fix issues with server-port not being updated to the current server list (fixes #176)
Bryan Drewery %!s(int64=17) %!d(string=hai) anos
pai
achega
4c279b1cf5
Modificáronse 2 ficheiros con 1 adicións e 11 borrados
  1. 1 0
      doc/UPDATES
  2. 0 11
      src/mod/server.mod/server.c

+ 1 - 0
doc/UPDATES

@@ -34,6 +34,7 @@
 * Fix problem of bots never reconnecting to hub after being up for long periods.
 * Fix problem of upgrading with uninitialized binaries causing corruption (will kick in on future upgrades)
 * Fix botcmd to make sure that results are delivered only to the requester (fixes #208)
+* Fix issues with server-port not being updated to the current server list (fixes #176)
 
 1.2.16 - http://wraith.botpack.net/milestone/1.2.16
 * Add 'set altchars' so that alternative characters used for nicks can be changed. (fixes #418)

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

@@ -680,9 +680,6 @@ void queue_server(int which, char *buf, int len)
 void add_server(char *ss)
 {
   struct server_list *x = NULL, *z = NULL;
-#ifdef USE_IPV6
-  char *r = NULL;
-#endif /* USE_IPV6 */
   char *p = NULL, *q = NULL;
 
   for (z = serverlist; z && z->next; z = z->next)
@@ -702,7 +699,6 @@ void add_server(char *ss)
     z = x;
     q = strchr(ss, ':');
     if (!q) {
-      x->port = default_port;
       x->pass = 0;
       x->name = strdup(ss);
     } else {
@@ -711,9 +707,6 @@ void add_server(char *ss)
         ++ss;
         q = strchr(ss, ']');
         *q++ = 0; /* intentional */
-        r = strchr(q, ':');
-        if (!r)
-          x->port = default_port;
       }
 #endif /* USE_IPV6 */
       *q++ = 0;
@@ -727,13 +720,9 @@ void add_server(char *ss)
 	*q++ = 0;
         x->pass = strdup(q);
       }
-#ifdef USE_IPV6
       if (!x->port) {
         x->port = atoi(ss);
       }
-#else
-      x->port = atoi(ss);
-#endif /* USE_IPV6 */
     }
     ss = p;
   }