Jelajahi Sumber

* Fixed leaf using hub port for /ctcp chat

svn: 1562
Bryan Drewery 21 tahun lalu
induk
melakukan
6e3ad4619f
2 mengubah file dengan 2 tambahan dan 5 penghapusan
  1. 0 3
      src/dccutil.c
  2. 2 2
      src/mod/ctcp.mod/ctcp.c

+ 0 - 3
src/dccutil.c

@@ -635,9 +635,6 @@ do_boot(int idx, char *by, char *reason)
 port_t
 port_t
 listen_all(port_t lport, bool off)
 listen_all(port_t lport, bool off)
 {
 {
-  if (!lport)
-    return 0;
-
   int idx = (-1);
   int idx = (-1);
   port_t port, realport;
   port_t port, realport;
 
 

+ 2 - 2
src/mod/ctcp.mod/ctcp.c

@@ -580,9 +580,9 @@ static int ctcp_CHAT(char *nick, char *uhost, struct userrec *u, char *object, c
       return BIND_RET_BREAK;
       return BIND_RET_BREAK;
     }
     }
 
 
-    int ix = -1;
+    int ix = -1, i = 0;
 
 
-    for (int i = 0; i < dcc_total; i++) {
+    for (i = 0; i < dcc_total; i++) {
       if (dcc[i].type && (dcc[i].type->flags & DCT_LISTEN) && (!strcmp(dcc[i].nick, "(telnet)")))
       if (dcc[i].type && (dcc[i].type->flags & DCT_LISTEN) && (!strcmp(dcc[i].nick, "(telnet)")))
         ix = i;
         ix = i;
     }
     }