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

cvs at eggheads.org cvs at eggheads.org
Thu Mar 18 09:19:49 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2010-03-18 15:19:49 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     doc/Changes1.6 doc/tcl-commands.doc doc/html/tcl-commands.html
     src/match.c src/patch.h src/tclmisc.c

Log message:

Modified cron_match() to match Sunday as both 0 and 7.
Fixed some spelling errors.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.75 eggdrop1.6/doc/Changes1.6:1.76
--- eggdrop1.6/doc/Changes1.6:1.75	Sun Mar 14 12:34:59 2010
+++ eggdrop1.6/doc/Changes1.6	Thu Mar 18 09:19:38 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.75 2010/03/14 18:34:59 pseudo Exp $
+$Id: Changes1.6,v 1.76 2010/03/18 15:19:38 pseudo Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,10 @@
 
 1.6.20 (CVS):
 
+  - Modified cron_match() to match Sunday as both 0 and 7.
+  - Fixed some spelling errors.
+    Patch by: pseudo
+
   - Added new Tcl command 'matchstr' as a simplified alternative to Tcl's
     string match.
     Found by: thommey / Patch by: pseudo
Index: eggdrop1.6/doc/html/tcl-commands.html
diff -u eggdrop1.6/doc/html/tcl-commands.html:1.68 eggdrop1.6/doc/html/tcl-commands.html:1.69
--- eggdrop1.6/doc/html/tcl-commands.html:1.68	Sun Mar 14 12:34:59 2010
+++ eggdrop1.6/doc/html/tcl-commands.html	Thu Mar 18 09:19:39 2010
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.68 2010/03/14 18:34:59 pseudo Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.69 2010/03/18 15:19:39 pseudo Exp $ -->
 
 <html>
   <head>
@@ -4815,12 +4815,11 @@
               proc-name &lt;queue&gt; &lt;text&gt; &lt;queued|sent&gt;
               </strong></p>
 
-              <p><strong>Description:</strong> triggered triggered whenever
-              output is sent to the server. Normally the event will occur
-              twice for each line sent: once before entering a server queue
-              and once after the message is actually sent. This allows for more
-              flexible logging of server output and introduces the ability to
-              cancel the message.
+              <p><strong>Description:</strong> triggered whenever output is sent
+              to the server. Normally the event will occur twice for each line
+              sent: once before entering a server queue and once after the
+              message is actually sent. This allows for more flexible logging of
+              server output and introduces the ability to cancel messages.
               Mask is matched against "queue status", where status is either
               'queued' or 'sent'. Queues are: mode, server, help, noqueue.
               noqueue is only used by the putnow tcl command.</p>
@@ -4839,14 +4838,14 @@
               mask is evaluated as a cron expression, e.g.
               &quot;16/2 */2 5-15 7,8,9 4&quot;. It can contain up to five
               fields: minute, hour, day, month, weekday; delimited by
-              whitespace. Week days are represented as 0-6, where 0 is Sunday.
-              Symbolic names are not supported. The bind will be triggered if
-              the mask matches all of the fields, except that if both day and
-              weekday are not '*', only one of them is required to match. If
-              any number of fields are omitted at the end, the match will
-              proceed as if they were '*'. All cron operators are supported.
-              Please refer to the crontab manual for their meanings. Flags are
-              ignored.</p>
+              whitespace. Week days are represented as 0-6, except Sunday
+              which can be either 0 or 7. Symbolic names are not supported. The
+              bind will be triggered if the mask matches all of the fields,
+              except that if both day and weekday are not '*', only one of them
+              is required to match. If any number of fields are omitted at the
+              end, the match will proceed as if they were '*'. All cron
+              operators are supported. Please refer to the crontab manual for
+              their meanings. Flags are ignored.</p>
 
               <p><strong>Module:</strong> core</p>
             </li>
Index: eggdrop1.6/doc/tcl-commands.doc
diff -u eggdrop1.6/doc/tcl-commands.doc:1.134 eggdrop1.6/doc/tcl-commands.doc:1.135
--- eggdrop1.6/doc/tcl-commands.doc:1.134	Sun Mar 14 12:34:59 2010
+++ eggdrop1.6/doc/tcl-commands.doc	Thu Mar 18 09:19:38 2010
@@ -1,4 +1,4 @@
-$Id: tcl-commands.doc,v 1.134 2010/03/14 18:34:59 pseudo Exp $
+$Id: tcl-commands.doc,v 1.135 2010/03/18 15:19:38 pseudo Exp $
 
 Eggdrop Tcl Commands
 Last revised: November 23, 2009
@@ -2226,13 +2226,13 @@
 |        Description: similar to bind TIME, but the mask is evaluated as a cron
 |          expression, e.g. "16/2 */2 5-15 7,8,9 4". It can contain up to five
 |          fields: minute, hour, day, month, weekday; delimited by whitespace.
-|          Week days are represented as 0-6, where 0 is Sunday. Symbolic names
-|          are not supported. The bind will be triggered if the mask matches all
-|          of the fields, except that if both day and weekday are not '*', only
-|          one of them is required to match. If any number of fields are omitted
-|          at the end, the match will proceed as if they were '*'. All cron
-|          operators are supported. Please refer to the crontab manual for their
-|          meanings. Flags are ignored.
+|          Week days are represented as 0-6, where Sunday can be either 0 or 7.
+|          Symbolic names are not supported. The bind will be triggered if the
+|          mask matches all of the fields, except that if both day and weekday
+|          are not '*', only one of them is required to match. If any number of
+|          fields are omitted at the end, the match will proceed as if they were
+|          '*'. All cron operators are supported. Please refer to the crontab
+|          manual for their meanings. Flags are ignored.
 |        Module: core
 
 |   (47) LOG (stackable)
Index: eggdrop1.6/src/match.c
diff -u eggdrop1.6/src/match.c:1.16 eggdrop1.6/src/match.c:1.17
--- eggdrop1.6/src/match.c:1.16	Mon Mar  8 05:18:07 2010
+++ eggdrop1.6/src/match.c	Thu Mar 18 09:19:39 2010
@@ -4,7 +4,7 @@
  *   hostmask matching
  *   cidr matching
  *
- * $Id: match.c,v 1.16 2010/03/08 11:18:07 pseudo Exp $
+ * $Id: match.c,v 1.17 2010/03/18 15:19:39 pseudo Exp $
  *
  * Once this code was working, I added support for % so that I could
  * use the same code both in Eggdrop and in my IrcII client.
@@ -413,9 +413,9 @@
  * crontab operators are supported: ranges '-', asterisks '*',
  * lists ',' and steps '/'.
  * match must have 5 space separated integers representing in order
- * the current minute, hour, day of month, month and year.
- * It should look like this: "53 17 01 03 2010", which means
- * 01 March 2010, 17:53.
+ * the current minute, hour, day of month, month and weekday.
+ * It should look like this: "53 17 01 03 06", which means
+ * Sunday 01 March, 17:53.
  */
 int cron_match(const char *mask, const char *match)
 {
@@ -433,7 +433,8 @@
     q = newsplit(&p);
     if (!strcmp(q, "*"))
       continue;
-    m = cron_matchfld(q, t[i]);
+    m = (cron_matchfld(q, t[i]) ||
+        (i == 4 && !t[i] && cron_matchfld(q, 7)));
     if (i == 2)
       d = m;
     else if (!m || (i == 3 && d))
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1243 eggdrop1.6/src/patch.h:1.1244
--- eggdrop1.6/src/patch.h:1.1243	Sun Mar 14 12:34:59 2010
+++ eggdrop1.6/src/patch.h	Thu Mar 18 09:19:39 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1243 2010/03/14 18:34:59 pseudo Exp $
+ * $Id: patch.h,v 1.1244 2010/03/18 15:19:39 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1268591523");            /* current unixtime */
+patch("1268925437");            /* current unixtime */
 /*
  *
  *
  */
-patch("matchstr");
+patch("sundaycron");
 /*
  *
  *
Index: eggdrop1.6/src/tclmisc.c
diff -u eggdrop1.6/src/tclmisc.c:1.68 eggdrop1.6/src/tclmisc.c:1.69
--- eggdrop1.6/src/tclmisc.c:1.68	Sun Mar 14 12:34:59 2010
+++ eggdrop1.6/src/tclmisc.c	Thu Mar 18 09:19:39 2010
@@ -2,7 +2,7 @@
  * tclmisc.c -- handles:
  *   Tcl stubs for everything else
  *
- * $Id: tclmisc.c,v 1.68 2010/03/14 18:34:59 pseudo Exp $
+ * $Id: tclmisc.c,v 1.69 2010/03/18 15:19:39 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -565,7 +565,7 @@
 
   if (uname(&un) < 0) {
 #endif
-    unix_n = "*unkown*";
+    unix_n = "*unknown*";
     vers_n = "";
 #ifdef HAVE_UNAME
   } else {
----------------------- End of diff -----------------------


More information about the Changes mailing list