Parcourir la source

* Only close the listen port if there's one open

Bryan Drewery il y a 16 ans
Parent
commit
077d85bd78
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/mod/ctcp.mod/ctcp.c

+ 4 - 1
src/mod/ctcp.mod/ctcp.c

@@ -387,7 +387,10 @@ static void ctcp_minutely()
   }
 
   if (listen_time <= 0) {
-    listen_all(0, 1, 0);
+    for (int i = 0; i < dcc_total; i++) {
+      if (dcc[i].type && (dcc[i].type->flags & DCT_LISTEN) && !strcmp(dcc[i].nick, "(telnet)"))
+        listen_all(0, 1, 0);
+    }
   } else
     listen_time--;
 }