[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Fri Jun 22 15:42:10 CST 2012


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Branch tags: gettext
Commit time: 2012-06-22 21:42:10 UTC
Committer  : Thomas Sader <thommey at gmail.com>

Modified files:
  Tag: gettext
     doc/Changes1.8 doc/tcl-commands.doc doc/html/tcl-commands.html
     src/cmds.c src/dcc.c src/eggdrop.h src/patch.h src/tclmisc.c

Log message:

new stripcode flag "o" for mirc ctrl+o and * for everything 

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.36.2.26 eggdrop1.8/doc/Changes1.8:1.36.2.27
--- eggdrop1.8/doc/Changes1.8:1.36.2.26	Tue Jun 19 08:27:06 2012
+++ eggdrop1.8/doc/Changes1.8	Fri Jun 22 15:42:00 2012
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.36.2.26 2012/06/19 14:27:06 thommey Exp $
+$Id: Changes1.8,v 1.36.2.27 2012/06/22 21:42:00 thommey Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,10 @@
 
 1.8.0 (CVS):
 
+  - Added a [stripcodes] flag to remove mIRC's CTRL+o (ascii 15) which
+    terminates all bold, underline, color. Also added * to strip everything.
+    Patch by: thommey / Found by: SpiKe, ealexp
+
   - Partially revert changes to vwait/update. They are back to only
     processing Tcl events for now (fileevent/after) as handling eggdrop
     events turned out to require careful examination of reentrance issues.
Index: eggdrop1.8/doc/html/tcl-commands.html
diff -u eggdrop1.8/doc/html/tcl-commands.html:1.9.2.1 eggdrop1.8/doc/html/tcl-commands.html:1.9.2.2
--- eggdrop1.8/doc/html/tcl-commands.html:1.9.2.1	Sat Feb 26 13:26:53 2011
+++ eggdrop1.8/doc/html/tcl-commands.html	Fri Jun 22 15:42:00 2012
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.9.2.1 2011/02/26 19:26:53 thommey Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.9.2.2 2012/06/22 21:42:00 thommey Exp $ -->
 
 <html>
   <head>
@@ -3674,6 +3674,26 @@
                   <p>remove all ctrl-g (bell) codes</p>
                 </td>
               </tr>
+
+              <tr valign="top">
+                <td>
+                  <p><strong>o</strong></p>
+                </td>
+
+                <td>
+                  <p>remove all reset codes (mIRC ctrl+o, ascii 15)</p>
+                </td>
+              </tr>
+
+              <tr valign="top">
+                <td>
+                  <p><strong>*</strong></p>
+                </td>
+
+                <td>
+                  <p>remove all of the above</p>
+                </td>
+              </tr>
             </table>
           </blockquote>
 
Index: eggdrop1.8/doc/tcl-commands.doc
diff -u eggdrop1.8/doc/tcl-commands.doc:1.8.2.1 eggdrop1.8/doc/tcl-commands.doc:1.8.2.2
--- eggdrop1.8/doc/tcl-commands.doc:1.8.2.1	Sat Feb 26 13:26:53 2011
+++ eggdrop1.8/doc/tcl-commands.doc	Fri Jun 22 15:42:00 2012
@@ -1,4 +1,4 @@
-$Id: tcl-commands.doc,v 1.8.2.1 2011/02/26 19:26:53 thommey Exp $
+$Id: tcl-commands.doc,v 1.8.2.2 2012/06/22 21:42:00 thommey Exp $
 
 Eggdrop Tcl Commands
 Last revised: October 24, 2010
@@ -1595,6 +1595,8 @@
         u - remove all underline codes
         a - remove all ANSI codes
         g - remove all ctrl-g (bell) codes
+        o - remove all reset codes (mIRC ctrl+o, ascii 15)
+        * - remove all of the above
     Returns: the stripped string.
     Module: core
 
Index: eggdrop1.8/src/cmds.c
diff -u eggdrop1.8/src/cmds.c:1.4.2.2 eggdrop1.8/src/cmds.c:1.4.2.3
--- eggdrop1.8/src/cmds.c:1.4.2.2	Wed Jan 12 07:54:00 2011
+++ eggdrop1.8/src/cmds.c	Fri Jun 22 15:42:00 2012
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.4.2.2 2011/01/12 13:54:00 pseudo Exp $
+ * $Id: cmds.c,v 1.4.2.3 2012/06/22 21:42:00 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -2026,6 +2026,9 @@
     case 'g':
       res |= STRIP_BELLS;
       break;
+    case 'o':
+      res |= STRIP_RESET;
+      break;
     case '*':
       res |= STRIP_ALL;
       break;
@@ -2050,6 +2053,8 @@
     *p++ = 'a';
   if (x & STRIP_BELLS)
     *p++ = 'g';
+  if (x & STRIP_RESET)
+    *p++ = 'o';
   if (p == s)
     *p++ = '-';
   *p = 0;
@@ -2074,6 +2079,8 @@
     i += my_strcpy(s + i, _("ansi, "));
   if (x & STRIP_BELLS)
     i += my_strcpy(s + i, _("bells, "));
+  if (x & STRIP_RESET)
+    i += my_strcpy(s + i, _("reset, "));
   if (!i)
     strcpy(s, _("none"));
   else
Index: eggdrop1.8/src/dcc.c
diff -u eggdrop1.8/src/dcc.c:1.6.2.5 eggdrop1.8/src/dcc.c:1.6.2.6
--- eggdrop1.8/src/dcc.c:1.6.2.5	Sat Jun 16 09:59:48 2012
+++ eggdrop1.8/src/dcc.c	Fri Jun 22 15:42:00 2012
@@ -4,7 +4,7 @@
  *   disconnect on a dcc socket
  *   ...and that's it!  (but it's a LOT)
  *
- * $Id: dcc.c,v 1.6.2.5 2012/06/16 15:59:48 thommey Exp $
+ * $Id: dcc.c,v 1.6.2.6 2012/06/22 21:42:00 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -826,6 +826,12 @@
         continue;
       }
       break;
+    case 017:                  /* Reset all control chars (mIRC ctrl+o) */
+      if (flags & STRIP_RESET) {
+        text++;
+        continue;
+      }
+      break;
     case 0x16:                 /* Reverse video */
       if (flags & STRIP_REV) {
         text++;
Index: eggdrop1.8/src/eggdrop.h
diff -u eggdrop1.8/src/eggdrop.h:1.6.2.1 eggdrop1.8/src/eggdrop.h:1.6.2.2
--- eggdrop1.8/src/eggdrop.h:1.6.2.1	Sun Feb  6 13:19:15 2011
+++ eggdrop1.8/src/eggdrop.h	Fri Jun 22 15:42:00 2012
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.6.2.1 2011/02/06 19:19:15 pseudo Exp $
+ * $Id: eggdrop.h,v 1.6.2.2 2012/06/22 21:42:00 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -555,6 +555,7 @@
 #define STRIP_UNDER  0x00008    /* remove underline codes               */
 #define STRIP_ANSI   0x00010    /* remove ALL ANSI codes                */
 #define STRIP_BELLS  0x00020    /* remove ctrl-g's                      */
+#define STRIP_RESET  0x00040    /* remove mirc ctrl+o                   */
 #define STRIP_ALL    0x0007F    /* remove every damn thing!             */
 
 /* For dcc bot links. */
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.25.2.21 eggdrop1.8/src/patch.h:1.25.2.22
--- eggdrop1.8/src/patch.h:1.25.2.21	Tue Jun 19 08:27:06 2012
+++ eggdrop1.8/src/patch.h	Fri Jun 22 15:42:00 2012
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.25.2.21 2012/06/19 14:27:06 thommey Exp $
+ * $Id: patch.h,v 1.25.2.22 2012/06/22 21:42:00 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1340115616");            /* current unixtime */
+patch("1340400890");            /* current unixtime */
 /*
  *
  *
  */
-patch("tclvwait");
+patch("stripmore");
 /*
  *
  *
Index: eggdrop1.8/src/tclmisc.c
diff -u eggdrop1.8/src/tclmisc.c:1.5.2.2 eggdrop1.8/src/tclmisc.c:1.5.2.3
--- eggdrop1.8/src/tclmisc.c:1.5.2.2	Wed Jan 12 07:54:00 2011
+++ eggdrop1.8/src/tclmisc.c	Fri Jun 22 15:42:00 2012
@@ -2,7 +2,7 @@
  * tclmisc.c -- handles:
  *   Tcl stubs for everything else
  *
- * $Id: tclmisc.c,v 1.5.2.2 2011/01/12 13:54:00 pseudo Exp $
+ * $Id: tclmisc.c,v 1.5.2.3 2012/06/22 21:42:00 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -681,6 +681,12 @@
     case 'u':
       flags |= STRIP_UNDER;
       break;
+    case 'o':
+      flags |= STRIP_RESET;
+      break;
+    case '*':
+      flags |= STRIP_ALL;
+      break;
     default:
       Tcl_AppendResult(irp, "Invalid strip-flags: ", argv[1], NULL);
       return TCL_ERROR;
----------------------- End of diff -----------------------


More information about the Changes mailing list