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

cvs at eggheads.org cvs at eggheads.org
Fri Jun 22 17:37:52 CST 2012


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Branch tags: gettext
Commit time: 2012-06-22 23:37:52 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:

add stripcodes flag to strip italics and rename code for stripcodes o

---------------------- diff included ----------------------
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.36.2.27 eggdrop1.8/doc/Changes1.8:1.36.2.28
--- eggdrop1.8/doc/Changes1.8:1.36.2.27	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/doc/Changes1.8	Fri Jun 22 17:37:41 2012
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.36.2.27 2012/06/22 21:42:00 thommey Exp $
+$Id: Changes1.8,v 1.36.2.28 2012/06/22 23:37:41 thommey Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,11 @@
 
 1.8.0 (CVS):
 
+
+  - Added a [stripcodes] flag to remove mIRC's italics (ascii 29).
+  - Refactored code to clarify 'o' means "ordinary".
+    Patch by: thommey / Found by: speechles
+
   - 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
Index: eggdrop1.8/doc/html/tcl-commands.html
diff -u eggdrop1.8/doc/html/tcl-commands.html:1.9.2.2 eggdrop1.8/doc/html/tcl-commands.html:1.9.2.3
--- eggdrop1.8/doc/html/tcl-commands.html:1.9.2.2	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/doc/html/tcl-commands.html	Fri Jun 22 17:37:42 2012
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.9.2.2 2012/06/22 21:42:00 thommey Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.9.2.3 2012/06/22 23:37:42 thommey Exp $ -->
 
 <html>
   <head>
@@ -3681,12 +3681,21 @@
                 </td>
 
                 <td>
-                  <p>remove all reset codes (mIRC ctrl+o, ascii 15)</p>
+                  <p>remove all ordinary codes (ctrl+o, terminates bold/color/..)</p>
                 </td>
               </tr>
 
               <tr valign="top">
                 <td>
+                  <p><strong>o</strong></p>
+                </td>
+
+                <td>
+                  <p>remove all italics codes</p>
+                </td>
+              </tr>
+              <tr valign="top">
+                <td>
                   <p><strong>*</strong></p>
                 </td>
 
Index: eggdrop1.8/doc/tcl-commands.doc
diff -u eggdrop1.8/doc/tcl-commands.doc:1.8.2.2 eggdrop1.8/doc/tcl-commands.doc:1.8.2.3
--- eggdrop1.8/doc/tcl-commands.doc:1.8.2.2	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/doc/tcl-commands.doc	Fri Jun 22 17:37:42 2012
@@ -1,4 +1,4 @@
-$Id: tcl-commands.doc,v 1.8.2.2 2012/06/22 21:42:00 thommey Exp $
+$Id: tcl-commands.doc,v 1.8.2.3 2012/06/22 23:37:42 thommey Exp $
 
 Eggdrop Tcl Commands
 Last revised: October 24, 2010
@@ -1595,7 +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)
+        o - remove all ordinary codes (ctrl+o, terminates bold/color/..)
+        i - remove all italics codes
         * - 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.3 eggdrop1.8/src/cmds.c:1.4.2.4
--- eggdrop1.8/src/cmds.c:1.4.2.3	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/src/cmds.c	Fri Jun 22 17:37:42 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.3 2012/06/22 21:42:00 thommey Exp $
+ * $Id: cmds.c,v 1.4.2.4 2012/06/22 23:37:42 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -2015,10 +2015,16 @@
       res |= STRIP_COLOR;
       break;
     case 'r':
-      res |= STRIP_REV;
+      res |= STRIP_REVERSE;
       break;
     case 'u':
-      res |= STRIP_UNDER;
+      res |= STRIP_UNDERLINE;
+      break;
+    case 'i':
+      res |= STRIP_ITALICS;
+      break;
+    case 'o':
+      res |= STRIP_ORDINARY;
       break;
     case 'a':
       res |= STRIP_ANSI;
@@ -2026,9 +2032,6 @@
     case 'g':
       res |= STRIP_BELLS;
       break;
-    case 'o':
-      res |= STRIP_RESET;
-      break;
     case '*':
       res |= STRIP_ALL;
       break;
@@ -2045,16 +2048,18 @@
     *p++ = 'b';
   if (x & STRIP_COLOR)
     *p++ = 'c';
-  if (x & STRIP_REV)
+  if (x & STRIP_REVERSE)
     *p++ = 'r';
-  if (x & STRIP_UNDER)
+  if (x & STRIP_ITALICS)
+    *p++ = 'i';
+  if (x & STRIP_ORDINARY)
+    *p++ = 'o';
+  if (x & STRIP_UNDERLINE)
     *p++ = 'u';
   if (x & STRIP_ANSI)
     *p++ = 'a';
   if (x & STRIP_BELLS)
     *p++ = 'g';
-  if (x & STRIP_RESET)
-    *p++ = 'o';
   if (p == s)
     *p++ = '-';
   *p = 0;
@@ -2071,16 +2076,18 @@
     i += my_strcpy(s + i, _("bold, "));
   if (x & STRIP_COLOR)
     i += my_strcpy(s + i, _("color, "));
-  if (x & STRIP_REV)
+  if (x & STRIP_REVERSE)
     i += my_strcpy(s + i, _("reverse, "));
-  if (x & STRIP_UNDER)
+  if (x & STRIP_UNDERLINE)
     i += my_strcpy(s + i, _("underline, "));
+  if (x & STRIP_ITALICS)
+    i += my_strcpy(s + i, _("italics, "));
+  if (x & STRIP_ORDINARY)
+    i += my_strcpy(s + i, _("ordinary, "));
   if (x & STRIP_ANSI)
     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.6 eggdrop1.8/src/dcc.c:1.6.2.7
--- eggdrop1.8/src/dcc.c:1.6.2.6	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/src/dcc.c	Fri Jun 22 17:37:42 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.6 2012/06/22 21:42:00 thommey Exp $
+ * $Id: dcc.c,v 1.6.2.7 2012/06/22 23:37:42 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -826,20 +826,26 @@
         continue;
       }
       break;
-    case 017:                  /* Reset all control chars (mIRC ctrl+o) */
-      if (flags & STRIP_RESET) {
+    case 017:                  /* Ordinary (mIRC ctrl+o) */
+      if (flags & STRIP_ORDINARY) {
         text++;
         continue;
       }
       break;
     case 0x16:                 /* Reverse video */
-      if (flags & STRIP_REV) {
+      if (flags & STRIP_REVERSE) {
+        text++;
+        continue;
+      }
+      break;
+    case 29:                   /* Italics */
+      if (flags & STRIP_ITALICS) {
         text++;
         continue;
       }
       break;
     case 0x1f:                 /* Underlined text */
-      if (flags & STRIP_UNDER) {
+      if (flags & STRIP_UNDERLINE) {
         text++;
         continue;
       }
Index: eggdrop1.8/src/eggdrop.h
diff -u eggdrop1.8/src/eggdrop.h:1.6.2.2 eggdrop1.8/src/eggdrop.h:1.6.2.3
--- eggdrop1.8/src/eggdrop.h:1.6.2.2	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/src/eggdrop.h	Fri Jun 22 17:37:42 2012
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.6.2.2 2012/06/22 21:42:00 thommey Exp $
+ * $Id: eggdrop.h,v 1.6.2.3 2012/06/22 23:37:42 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -549,14 +549,15 @@
 #define STAT_PAGE    0x00080    /* page output to the user              */
 
 /* For stripping out mIRC codes. */
-#define STRIP_COLOR  0x00001    /* remove mIRC color codes              */
-#define STRIP_BOLD   0x00002    /* remove bold codes                    */
-#define STRIP_REV    0x00004    /* remove reverse video codes           */
-#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!             */
+#define STRIP_COLOR     0x00001    /* remove mIRC color codes            */
+#define STRIP_BOLD      0x00002    /* remove bold codes                  */
+#define STRIP_REVERSE   0x00004    /* remove reverse video codes         */
+#define STRIP_UNDERLINE 0x00008    /* remove underline codes             */
+#define STRIP_ANSI      0x00010    /* remove ALL ANSI codes              */
+#define STRIP_BELLS     0x00020    /* remove ctrl-g's                    */
+#define STRIP_ORDINARY  0x00040    /* remove ordinary codes              */
+#define STRIP_ITALICS   0x00080    /* remove italics codes               */
+#define STRIP_ALL       0x000FF    /* remove every damn thing!           */
 
 /* For dcc bot links. */
 #define STAT_PINGED  0x00001    /* waiting for ping to return            */
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.25.2.22 eggdrop1.8/src/patch.h:1.25.2.23
--- eggdrop1.8/src/patch.h:1.25.2.22	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/src/patch.h	Fri Jun 22 17:37:42 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.22 2012/06/22 21:42:00 thommey Exp $
+ * $Id: patch.h,v 1.25.2.23 2012/06/22 23:37:42 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1340400890");            /* current unixtime */
+patch("1340407853");            /* current unixtime */
 /*
  *
  *
  */
-patch("stripmore");
+patch("stripmoar");
 /*
  *
  *
Index: eggdrop1.8/src/tclmisc.c
diff -u eggdrop1.8/src/tclmisc.c:1.5.2.3 eggdrop1.8/src/tclmisc.c:1.5.2.4
--- eggdrop1.8/src/tclmisc.c:1.5.2.3	Fri Jun 22 15:42:00 2012
+++ eggdrop1.8/src/tclmisc.c	Fri Jun 22 17:37:42 2012
@@ -2,7 +2,7 @@
  * tclmisc.c -- handles:
  *   Tcl stubs for everything else
  *
- * $Id: tclmisc.c,v 1.5.2.3 2012/06/22 21:42:00 thommey Exp $
+ * $Id: tclmisc.c,v 1.5.2.4 2012/06/22 23:37:42 thommey Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -672,17 +672,20 @@
     case 'c':
       flags |= STRIP_COLOR;
       break;
+    case 'o':
+      flags |= STRIP_ORDINARY;
+      break;
+    case 'i':
+      flags |= STRIP_ITALICS;
+      break;
     case 'g':
       flags |= STRIP_BELLS;
       break;
     case 'r':
-      flags |= STRIP_REV;
+      flags |= STRIP_REVERSE;
       break;
     case 'u':
-      flags |= STRIP_UNDER;
-      break;
-    case 'o':
-      flags |= STRIP_RESET;
+      flags |= STRIP_UNDERLINE;
       break;
     case '*':
       flags |= STRIP_ALL;
----------------------- End of diff -----------------------


More information about the Changes mailing list