Przeglądaj źródła

* Use listen_all() to close the CTCP chat listen port

Bryan Drewery 16 lat temu
rodzic
commit
4a3d834861
1 zmienionych plików z 1 dodań i 10 usunięć
  1. 1 10
      src/mod/ctcp.mod/ctcp.c

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

@@ -387,16 +387,7 @@ static void ctcp_minutely()
   }
 
   if (listen_time <= 0) {
-    for (int i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && (dcc[i].type->flags & DCT_LISTEN) && 
-           (!strcmp(dcc[i].nick, "(telnet)") || !strcmp(dcc[i].nick, "(telnet6)"))) {
-        putlog(LOG_DEBUG, "*", "Closing listening port %d %s", dcc[i].port, dcc[i].nick);
-
-        killsock(dcc[i].sock);
-        lostdcc(i);
-        break;
-      }
-    }
+    listen_all(0, 1);
   } else
     listen_time--;
 }