瀏覽代碼

* Changed dcc[].msgc to dcc[].irc

svn: 1946
Bryan Drewery 21 年之前
父節點
當前提交
dfe1caf6e6
共有 4 個文件被更改,包括 6 次插入6 次删除
  1. 1 1
      src/dcc.h
  2. 2 2
      src/dccutil.c
  3. 1 1
      src/misc.c
  4. 2 2
      src/mod/irc.mod/msgcmds.c

+ 1 - 1
src/dcc.h

@@ -49,7 +49,7 @@ struct dcc_t {
   int sock;
   int ssl;                      /* use ssl on this dcc? */
   int simul;                    /* this will hold the idx on the remote bot to return result. */
-  int msgc;			/* forward the output back to irc? */
+  bool irc;			/* forward the output back to irc? */
   int whowas;
   int dns_id;
   port_t port;

+ 2 - 2
src/dccutil.c

@@ -263,9 +263,9 @@ dprintf(int idx, const char *format, ...)
       strcat(buf, "\n");
       len = 1001;
     }
-    if (dcc[idx].simul > 0 && !dcc[idx].msgc) {
+    if (dcc[idx].simul > 0 && !dcc[idx].irc) {
       bounce_simul(idx, buf);
-    } else if (dcc[idx].msgc > 0) {
+    } else if (dcc[idx].irc) {
 //      size_t size = strlen(dcc[idx].simulbot) + strlen(buf) + 20;
 //      char *ircbuf = (char *) my_calloc(1, size);
 

+ 1 - 1
src/misc.c

@@ -959,7 +959,7 @@ coloridx(int idx)
   } else if (idx == -2) {
     return 2;	/* mIRC */
   /* valid idx and NOT relaying */
-  } else if (idx >= 0 && dcc[idx].msgc) {
+  } else if (idx >= 0 && dcc[idx].irc) {
     return 0;
   } else if (idx >= 0 && (dcc[idx].status & STAT_COLOR) && (dcc[idx].type && dcc[idx].type != &DCC_RELAYING)) {
     /* telnet probably wants ANSI, even though it might be a relay from an mIRC client; fuck`em */

+ 2 - 2
src/mod/irc.mod/msgcmds.c

@@ -476,7 +476,7 @@ static int msgc_test(char *nick, char *host, struct userrec *u, char *chname, ch
     chan++;
 
   for (i = 0; i < dcc_total; i++) {
-   if (dcc[i].type && dcc[i].msgc && ((chan && !strcmp(dcc[i].simulbot, chname) && !strcmp(dcc[i].nick, u->handle)) || 
+   if (dcc[i].type && dcc[i].irc && ((chan && !strcmp(dcc[i].simulbot, chname) && !strcmp(dcc[i].nick, u->handle)) || 
       (!chan && !strcmp(dcc[i].simulbot, nick)))) {
      putlog(LOG_DEBUG, "*", "Simul found old idx for %s/%s: %d", nick, chname, i);
      dcc[i].simultime = now;
@@ -489,7 +489,7 @@ static int msgc_test(char *nick, char *host, struct userrec *u, char *chname, ch
     idx = new_dcc(&DCC_CHAT, sizeof(struct chat_info));
     dcc[idx].sock = serv;
     dcc[idx].timeval = now;
-    dcc[idx].msgc = 1;
+    dcc[idx].irc = 1;
     dcc[idx].simultime = now;
     dcc[idx].simul = 1;
     dcc[idx].status = STAT_COLOR;