1
0
Эх сурвалжийг харах

* Fixed some socket writes that were being colorized when they shouldn't have been

svn: 2102
Bryan Drewery 21 жил өмнө
parent
commit
84eff8c742
2 өөрчлөгдсөн 5 нэмэгдсэн , 5 устгасан
  1. 3 3
      src/dcc.c
  2. 2 2
      src/enclink.c

+ 3 - 3
src/dcc.c

@@ -336,7 +336,7 @@ dcc_bot_new(int idx, char *buf, int x)
 
       sdprintf("Choosing '%s' (%d) for link", enclink[i].name, i);
       link_hash(idx, rand);
-      dprintf(idx, "neg %s %d\n", dcc[idx].shahash, enclink[i].type);
+      dprintf(-dcc[idx].sock, "neg %s %d\n", dcc[idx].shahash, enclink[i].type);
       socklist[snum].enclink = i;
       link_link(idx, -1, i, TO);
     }
@@ -943,7 +943,7 @@ dcc_chat_pass(int idx, char *buf, int atr)
 
       dcc[idx].type = &DCC_CHAT_SECPASS;
       dcc[idx].timeval = now;
-      dprintf(idx, "-Auth %s %s\n", randstr, conf.bot->nick);
+      dprintf(-dcc[idx].sock, "-Auth %s %s\n", randstr, conf.bot->nick);
     } else {
       dcc_chat_secpass(idx, pass, atr);
     }
@@ -1609,7 +1609,7 @@ dcc_telnet_pass(int idx, int atr)
       for (i = 0; enclink[i].name; i++)
         simple_sprintf(buf, "%s%d ", buf[0] ? buf : "", enclink[i].type);
 
-      dprintf(idx, "neg? %s %s\n", rand, buf);
+      dprintf(-dcc[idx].sock, "neg? %s %s\n", rand, buf);
     } else
       /* Turn off remote telnet echo (send IAC WILL ECHO). */
       dprintf(idx, "\n%s" TLN_IAC_C TLN_WILL_C TLN_ECHO_C "\n", DCC_ENTERPASS);

+ 2 - 2
src/enclink.c

@@ -250,12 +250,12 @@ void link_send(int idx, const char *format, ...)
   va_end(va);
   remove_crlf(s);
 
-  dprintf(idx, "neg! %s\n", s);
+  dprintf(-dcc[idx].sock, "neg! %s\n", s);
 }
 
 void link_done(int idx)
 {
-  dprintf(idx, "neg.\n");
+  dprintf(-dcc[idx].sock, "neg.\n");
 }
 
 int link_find_by_type(int type)