瀏覽代碼

* Fixed /me bug in partyline

svn: 1233
Bryan Drewery 22 年之前
父節點
當前提交
3d84524701
共有 2 個文件被更改,包括 16 次插入5 次删除
  1. 1 0
      doc/UPDATES
  2. 15 5
      src/dcc.c

+ 1 - 0
doc/UPDATES

@@ -34,6 +34,7 @@ This is a summary of ChangeLog basically.
 * +c bots will now boot users when they lose +c
 * +c bots will now boot users when they lose +c
 * Fixed a bug with removing hosts while having +d or +k
 * Fixed a bug with removing hosts while having +d or +k
 * Fixed an obscure memory bug with the perm-owner list
 * Fixed an obscure memory bug with the perm-owner list
+* Fixed /me over partyline; now auto changes into cmd_me
 
 
 1.1.9
 1.1.9
 
 

+ 15 - 5
src/dcc.c

@@ -1019,6 +1019,9 @@ dcc_chat(int idx, char *buf, int i)
     d = buf;
     d = buf;
     while (*v)
     while (*v)
       switch (*v) {
       switch (*v) {
+        case 1:			/* CTCP ?! */
+          v++;
+          break;
         case 7:                /* Beep - no more than 3 */
         case 7:                /* Beep - no more than 3 */
           nathan++;
           nathan++;
           if (nathan > 3)
           if (nathan > 3)
@@ -1101,11 +1104,18 @@ dcc_chat(int idx, char *buf, int i)
     } else {
     } else {
       if (dcc[idx].u.chat->away != NULL)
       if (dcc[idx].u.chat->away != NULL)
         not_away(idx);
         not_away(idx);
-      if (dcc[idx].status & STAT_ECHO)
-        chanout_but(-1, dcc[idx].u.chat->channel, "<%s> %s\n", dcc[idx].nick, buf);
-      else
-        chanout_but(idx, dcc[idx].u.chat->channel, "<%s> %s\n", dcc[idx].nick, buf);
-      botnet_send_chan(-1, conf.bot->nick, dcc[idx].nick, dcc[idx].u.chat->channel, buf);
+      if (!strncmp(buf, "CTCP_MESSAGE ", 13))		/* irssi */
+        buf += 13;
+      if (!strncmp(buf, "ACTION ", 7)) {
+        buf += 7;
+        check_bind_dcc("me", idx, buf);
+      } else {
+        if (dcc[idx].status & STAT_ECHO)
+          chanout_but(-1, dcc[idx].u.chat->channel, "<%s> %s\n", dcc[idx].nick, buf);
+        else
+          chanout_but(idx, dcc[idx].u.chat->channel, "<%s> %s\n", dcc[idx].nick, buf);
+        botnet_send_chan(-1, conf.bot->nick, dcc[idx].nick, dcc[idx].u.chat->channel, buf);
+      }
     }
     }
   }
   }
   if (dcc[idx].type == &DCC_CHAT)       /* Could have change to files */
   if (dcc[idx].type == &DCC_CHAT)       /* Could have change to files */