Преглед изворни кода

* Fix regression in localhubs: /CTCP bot CHAT was not returning a proper port.

Bryan Drewery пре 16 година
родитељ
комит
004b5a49fd
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 1
      src/chanprog.c
  2. 2 1
      src/dccutil.c

+ 1 - 1
src/chanprog.c

@@ -593,7 +593,7 @@ void rehash_ip() {
     // If not listening on the domain socket, open it up
     bool listening = 0;
     for (int i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && (dcc[i].type == &DCC_TELNET) && (!strcmp(dcc[i].host, conf.localhub_socket))) {
+      if (dcc[i].type && (dcc[i].type == &DCC_TELNET) && (!strcmp(dcc[i].host, conf.localhub_socket)) && (!strcmp(dcc[i].nick, "(unix_domain"))) {
         listening = 1;
         break;
       }

+ 2 - 1
src/dccutil.c

@@ -847,7 +847,8 @@ listen_all(port_t lport, bool off)
     }
 
   for (ii = 0; ii < dcc_total; ii++) {
-    if (dcc[ii].type && (dcc[ii].type == &DCC_TELNET) && (dcc[ii].port == port)) {
+    if (dcc[ii].type && (dcc[ii].type == &DCC_TELNET) && (dcc[ii].port == port) &&
+           (!strcmp(dcc[i].nick, "(telnet)") || !strcmp(dcc[i].nick, "(telnet6)"))) {
       idx = ii;
 
       if (off) {