[cvslog] (2005-07-31 02:58:05 UTC) Module eggdrop1.7: Change committed!

cvslog cvs at tsss.org
Sat Jul 30 20:58:05 CST 2005


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.7
Commit time: 2005-07-31 02:58:05 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     eggdrop.conf doc/TCL-COMMANDS doc/html/tcl-commands.html
     src/flags.c src/help.c src/patch.h src/tclegg.h src/tclhash.c
     src/mod/irc.mod/chan.c src/mod/server.mod/servmsg.c

Log message:

* Phase one of synching Tothwolf's recent 1.6 commits. I am breaking 
this up into several commits because the changes are pretty large.

---------------------- diff included ----------------------
Index: eggdrop1.7/doc/TCL-COMMANDS
diff -u eggdrop1.7/doc/TCL-COMMANDS:1.3 eggdrop1.7/doc/TCL-COMMANDS:1.4
--- eggdrop1.7/doc/TCL-COMMANDS:1.3	Thu Jan 20 19:43:37 2005
+++ eggdrop1.7/doc/TCL-COMMANDS	Sat Jul 30 21:57:54 2005
@@ -1,4 +1,4 @@
-$Id: TCL-COMMANDS,v 1.3 2005/01/21 01:43:37 wcc Exp $
+$Id: TCL-COMMANDS,v 1.4 2005/07/31 02:57:54 wcc Exp $
 
 Eggdrop Tcl Commands
 Last revised: August 24, 2004
@@ -1762,7 +1762,7 @@
            the nickname of the person who got kicked (can contain wildcards).
            The proc is called with the nick, user at host, and handle of the
            kicker, plus the channel, the nickname of the person who was
-           kicked, and the reason; flags are ignored.
+           kicked, and the reason.
          Module: irc
 
     (13) NICK (stackable)
@@ -1775,7 +1775,7 @@
            yet in a channel).
          Module: irc
 
-    (14) MODE   (stackable)
+    (14) MODE (stackable)
          bind mode <flags> <mask> <proc>
          proc-name <nick> <user at host> <handle> <channel> <mode-change> <target>
 
@@ -1783,10 +1783,10 @@
            parts before being sent here, so the <mode-change> will always
            be a single mode, such as "+m" or "-o". target will show the
            argument of the mode change (for o/v/b/e/I) or "" if the set
-           mode does not take an argument. Flags are ignored. The bot's
-           automatic response to a mode change will happen AFTER all
-           matching Tcl procs are called. The mask will be matched against
-           '#channel +/-modes' and can contain wildcards.
+           mode does not take an argument. The bot's automatic response
+           to a mode change will happen AFTER all matching Tcl procs are
+           called. The mask will be matched against '#channel ±modes'
+           and can contain wildcards.
 
            If it is a server mode, nick will be "", user at host is the server
            name, and handle is *.
@@ -1994,16 +1994,16 @@
            "*" for the bind); flags are ignored.
          Module: server
 
-    (31) NOTE
-         bind note <flags> <handle> <proc>
-         procname <from> <to> <text>
-
-         Description: incoming notes (either from the party line, someone on
-           IRC, or someone on another bot on the botnet) are checked against
-           these binds before being processed. If a bind exists, the bot will
-           not deliver the note. The handle must be an exact match (no wildcards),
-           but it is not case sensitive; flags are ignored.
-         Module: core
+|   (31) NOTE (stackable)
+|        bind note <flags> <mask> <proc>
+|        procname <from> <to> <text>
+|
+|        Description: incoming notes (either from the party line, someone on
+|          IRC, or someone on another bot on the botnet) are checked against
+|          these binds before being processed. The mask is matched against
+|          the receiving handle and supports wildcards. If the proc returns 1,
+|          Eggdrop will not process the note any further. Flags are ignored.
+|        Module: core
 
     (32) ACT (stackable)
          bind act <flags> <mask> <proc>
@@ -2048,7 +2048,7 @@
          Description: when someone joins a botnet channel, it invokes this
            binding. The mask is matched against the channel and can contain
            wildcards. flag is one of: * (owner), + (master), @ (op), or %
-           (botnet master).
+           (botnet master). Flags are ignored.
          Module: core
 
     (36) CHPT (stackable)
@@ -2056,8 +2056,8 @@
          proc-name <botname> <handle> <idx> <channel#>
 
          Description: when someone parts a botnet channel, it invokes this
-           binding. flags are ignored; the mask is matched against the
-           channel and can contain wildcards.
+           binding. The mask is matched against the channel and can contain
+           wildcards. Flags are ignored.
          Module: core
 
     (37) TIME (stackable)
@@ -2068,7 +2068,7 @@
            times. mask matches 5 space separated integers of the form:
            "minute hour day month year". minute, hour, day, month have a
            zero padding so they are exactly two characters long; year is
-           extended to four characters in the same way.
+           four characters. Flags are ignored.
          Module: core
 
     (38) AWAY (stackable)
@@ -2163,16 +2163,16 @@
     Here's a list of the bindings that use the return value from procs
     they trigger:
 
-    (1) MSG   Return 1 to make the command get logged like so:
+    (1) MSG   Return 1 to make Eggdrop log the command as:
                 (nick!user at host) !handle! command
 
-    (2) DCC   Return 1 to make the command get logged like so:
+    (2) DCC   Return 1 to make Eggdrop log the command as:
                 #handle# command
 
-    (3) FIL   Return 1 to make the command get logged like so:
+    (3) FIL   Return 1 to make Eggdrop log the command as:
                 #handle# files: command
 
-    (4) PUB   Return 1 to make the command get logged like so:
+    (4) PUB   Return 1 to make Eggdrop log the command as:
                 <<nick>> !handle! command
 
     (5) CTCP  Return 1 to ask the bot not to process the CTCP command on its
@@ -2195,8 +2195,13 @@
 
     (10) CHOF  Return 1 to ask the bot not to process the partyline part event.
 
-    (11) WALL  Return 1 to make the command get logged like so:
-           !nick! msg
+    (11) WALL  Return 1 to make Eggdrop log the command as:
+                 !nick! msg
+
+|   (12) NOTE  Return 1 to make Eggdrop not process the note any further.
+|              This includes stacked note bindings that would be processed
+|              after this one, as well as the built-in eggdrop note handling
+|              routines.
 
 *** CONTROL PROCEDURES ***
 
Index: eggdrop1.7/doc/html/tcl-commands.html
diff -u eggdrop1.7/doc/html/tcl-commands.html:1.5 eggdrop1.7/doc/html/tcl-commands.html:1.6
--- eggdrop1.7/doc/html/tcl-commands.html:1.5	Thu Jan 20 19:43:38 2005
+++ eggdrop1.7/doc/html/tcl-commands.html	Sat Jul 30 21:57:54 2005
@@ -1,5 +1,5 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- $Id: tcl-commands.html,v 1.5 2005/01/21 01:43:38 wcc Exp $ -->
+<!-- $Id: tcl-commands.html,v 1.6 2005/07/31 02:57:54 wcc Exp $ -->
 
 <html>
   <head>
@@ -4040,7 +4040,7 @@
               the person who got kicked (can contain wildcards). The proc
               is called with the nick, user at host, and handle of the kicker,
               plus the channel, the nickname of the person who was kicked,
-              and the reason; flags are ignored.</p>
+              and the reason.</p>
 
               <p><strong>Module:</strong> irc</p>
             </li>
@@ -4386,17 +4386,17 @@
             </li>
 
             <li>
-              <p><strong>NOTE</strong></p>
+              <p><strong>NOTE (stackable)</strong></p>
 
-              <p><strong>bind note &lt;flags&gt; &lt;handle&gt; &lt;proc&gt;<br>
+              <p><strong>bind note &lt;flags&gt; &lt;mask&gt; &lt;proc&gt;<br>
               procname &lt;from&gt; &lt;to&gt; &lt;text&gt;</strong></p>
 
               <p><strong>Description:</strong> incoming notes (either from
               the party line, someone on IRC, or someone on another bot on
               the botnet) are checked against these binds before being
-              processed. If a bind exists, the bot will not deliver the
-              note. The handle must be an exact match (no wildcards), but
-              it is not case sensitive; flags are ignored.</p>
+              processed. The mask is matched against the receiving handle
+              and supports wildcards. If the proc returns 1, Eggdrop will
+              not process the note any further. Flags are ignored.</p>
 
               <p><strong>Module:</strong> core</p>
             </li>
@@ -4461,7 +4461,8 @@
               <p><strong>Description:</strong> when someone joins a botnet
               channel, it invokes this binding. The mask is matched against
               the channel and can contain wildcards. flag is one of: *
-              (owner), + (master), @ (op), or % (botnet master).</p>
+              (owner), + (master), @ (op), or % (botnet master).
+              Flags are ignored.</p>
 
               <p><strong>Module:</strong> core</p>
             </li>
@@ -4474,8 +4475,8 @@
               &lt;channel#&gt;</strong></p>
 
               <p><strong>Description:</strong> when someone parts a botnet
-              channel, it invokes this binding. flags are ignored; the mask
-              is matched against the channel and can contain wildcards.</p>
+              channel, it invokes this binding. The mask is matched against
+              the channel and can contain wildcards. Flags are ignored.</p>
 
               <p><strong>Module:</strong> core</p>
             </li>
@@ -4491,8 +4492,8 @@
               procedure calls at certain times. mask matches 5 space
               separated integers of the form: &quot;minute hour day month
               year&quot;. minute, hour, day, month have a zero padding so
-              they are exactly two characters long; year is extended to
-              four characters in the same way. flags are ignored.</p>
+              they are exactly two characters long; year is four characters.
+              Flags are ignored.</p>
 
               <p><strong>Module:</strong> core</p>
             </li>
@@ -4761,9 +4762,9 @@
 
           <ol>
             <li>
-              <p><strong>MSG</strong>
+              <p><strong>MSG</strong></p>
 
-              <p>Return 1 to make the command get logged like so:</p>
+              <p>Return 1 to make Eggdrop log the command as:</p>
 
               <blockquote>
                 <p>(nick!user at host) !handle! command</p>
@@ -4771,9 +4772,9 @@
             </li>
 
             <li>
-              <p><strong>DCC</strong>
+              <p><strong>DCC</strong></p>
 
-              <p>Return 1 to make the command get logged like so:</p>
+              <p>Return 1 to make Eggdrop log the command as:</p>
 
               <blockquote>
                 <p>#handle# command</p>
@@ -4781,9 +4782,9 @@
             </li>
 
             <li>
-              <p><strong>FIL</strong>
+              <p><strong>FIL</strong></p>
 
-              <p>Return 1 to make the command get logged like so:</p>
+              <p>Return 1 to make Eggdrop log the command as:</p>
 
               <blockquote>
                 <p>#handle# files: command</p>
@@ -4791,9 +4792,9 @@
             </li>
 
             <li>
-              <p><strong>PUB</strong>
+              <p><strong>PUB</strong></p>
 
-              <p>Return 1 to make the command get logged like so:</p>
+              <p>Return 1 to make Eggdrop log the command as:</p>
 
               <blockquote>
                 <p>&lt;&lt;nick&gt;&gt; !handle! command</p>
@@ -4801,7 +4802,7 @@
             </li>
 
             <li>
-              <p><strong>CTCP</strong>
+              <p><strong>CTCP</strong></p>
 
               <p>Return 1 to ask the bot not to process the CTCP command on
               its own. Otherwise, it would send its own response to the CTCP
@@ -4810,7 +4811,7 @@
             </li>
 
             <li>
-              <p><strong>FILT</strong>
+              <p><strong>FILT</strong></p>
 
               <p>Return "" to indicate the text has been processed, and the
               bot should just ignore it. Otherwise, it will treat the text
@@ -4818,14 +4819,14 @@
             </li>
 
             <li>
-              <p><strong>FLUD</strong>
+              <p><strong>FLUD</strong></p>
 
               <p>Return 1 to ask the bot not to take action on the flood.
               Otherwise it will do its normal punishment.</p>
             </li>
 
             <li>
-              <p><strong>RAW</strong>
+              <p><strong>RAW</strong></p>
 
               <p>Return 1 to ask the bot not to process the server text.
               This can affect the bot&#39;s performance by causing it to
@@ -4834,28 +4835,37 @@
             </li>
 
             <li>
-              <p><strong>CHON</strong>
+              <p><strong>CHON</strong></p>
 
               <p>Return 1 to ask the bot not to process the partyline join
               event.</p>
             </li>
 
             <li>
-              <p><strong>CHOF</strong>
+              <p><strong>CHOF</strong></p>
 
               <p>Return 1 to ask the bot not to process the partyline part
               event.</p>
             </li>
 
             <li>
-              <p><strong>WALL</strong>
+              <p><strong>WALL</strong></p>
 
-              <p>Return 1 to make the command get logged like so:</p>
+              <p>Return 1 to make Eggdrop log the command as:</p>
 
               <blockquote>
                 <p>!nick! msg</p>
               </blockquote>
             </li>
+
+            <li>
+              <p><strong>NOTE</strong></p>
+
+              <p>Return 1 to make Eggdrop not process the note any
+              further. This includes stacked note bindings that would
+              be processed after this one, as well as the built-in
+              eggdrop note handling routines.</p>
+            </li>
           </ol>
         </li>
       </ol>
Index: eggdrop1.7/eggdrop.conf
diff -u eggdrop1.7/eggdrop.conf:1.6 eggdrop1.7/eggdrop.conf:1.7
--- eggdrop1.7/eggdrop.conf:1.6	Thu Dec  2 16:15:52 2004
+++ eggdrop1.7/eggdrop.conf	Sat Jul 30 21:57:54 2005
@@ -1,7 +1,7 @@
 #! /path/to/executable/eggdrop
 # ^- This should contain a fully qualified path to your Eggdrop executable.
 #
-# $Id: eggdrop.conf,v 1.6 2004/12/02 22:15:52 wcc Exp $
+# $Id: eggdrop.conf,v 1.7 2005/07/31 02:57:54 wcc Exp $
 #
 # This is a sample Eggdrop configuration file which includes all possible
 # settings that can be used to configure your bot.
@@ -1329,7 +1329,7 @@
 
 # Use this script for Tcl and Eggdrop downwards compatibility.
 # NOTE: This can also cause problems with some newer scripts.
-source scripts/compat.tcl
+#source scripts/compat.tcl
 
 # This script provides many useful informational functions, like setting
 # users' URLs, e-mail address, ICQ numbers, etc. You can modify it to add
Index: eggdrop1.7/src/flags.c
diff -u eggdrop1.7/src/flags.c:1.9 eggdrop1.7/src/flags.c:1.10
--- eggdrop1.7/src/flags.c:1.9	Thu Jan 20 19:43:40 2005
+++ eggdrop1.7/src/flags.c	Sat Jul 30 21:57:54 2005
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: flags.c,v 1.9 2005/01/21 01:43:40 wcc Exp $
+ * $Id: flags.c,v 1.10 2005/07/31 02:57:54 wcc Exp $
  */
 
 #include "main.h"
@@ -327,6 +327,9 @@
 
 int flagrec_ok(struct flag_record *req, struct flag_record *have)
 {
+  /* FIXME: flag masks with '&' in them won't be subject to
+   *        further tests below. Example: 'o&j'
+   */
   if (req->match & FR_AND)
     return flagrec_eq(req, have);
   else if (req->match & FR_OR) {
@@ -344,8 +347,8 @@
       }
       return 1;
     }
-    /* The +n/+m checks arent needed anymore since +n/+m
-     * automatically add lower flags
+    /* The +n/+m checks aren't needed anymore because +n/+m
+     * automatically adds lower flags
      */
     if (hav & req->global)
       return 1;
@@ -364,7 +367,7 @@
 {
   if (req->match & FR_AND) {
     if (req->match & FR_GLOBAL) {
-      if ((req->global &have->global) !=req->global)
+      if ((req->global & have->global) !=req->global)
         return 0;
       if ((req->udef_global & have->udef_global) != req->udef_global)
         return 0;
@@ -380,11 +383,11 @@
     }
     return 1;
   } else if (req->match & FR_OR) {
-    if (!req->chan && !req->global &&!req->udef_chan &&
+    if (!req->chan && !req->global && !req->udef_chan &&
         !req->udef_global && !req->bot)
       return 1;
     if (req->match & FR_GLOBAL) {
-      if (have->global &req->global)
+      if (have->global & req->global)
         return 1;
       if (have->udef_global & req->udef_global)
         return 1;
Index: eggdrop1.7/src/help.c
diff -u eggdrop1.7/src/help.c:1.4 eggdrop1.7/src/help.c:1.5
--- eggdrop1.7/src/help.c:1.4	Thu Jan 20 19:43:40 2005
+++ eggdrop1.7/src/help.c	Sat Jul 30 21:57:54 2005
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: help.c,v 1.4 2005/01/21 01:43:40 wcc Exp $
+ * $Id: help.c,v 1.5 2005/07/31 02:57:54 wcc Exp $
  */
 
 #include "main.h"
@@ -366,7 +366,11 @@
             struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
 
             break_down_flags(q + 1, &fr, NULL);
-            if (!flagrec_ok(&fr, flags))
+
+            /* We used to check flagrec_ok(), but we can use flagrec_eq()
+             * instead because lower flags are automatically added now.
+             */
+            if (!flagrec_eq(&fr, flags))
               blind |= 1;
             else
               blind &= ~1;
Index: eggdrop1.7/src/mod/irc.mod/chan.c
diff -u eggdrop1.7/src/mod/irc.mod/chan.c:1.5 eggdrop1.7/src/mod/irc.mod/chan.c:1.6
--- eggdrop1.7/src/mod/irc.mod/chan.c:1.5	Tue Jan 25 12:25:28 2005
+++ eggdrop1.7/src/mod/irc.mod/chan.c	Sat Jul 30 21:57:54 2005
@@ -6,7 +6,7 @@
  *   user kickban, kick, op, deop
  *   idle kicking
  *
- * $Id: chan.c,v 1.5 2005/01/25 18:25:28 wcc Exp $
+ * $Id: chan.c,v 1.6 2005/07/31 02:57:54 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -168,7 +168,17 @@
 
   if (!chan || (which < 0) || (which >= FLOOD_CHAN_MAX))
     return 0;
+
+  /* Okay, make sure i'm not flood-checking myself */
+  if (match_my_nick(floodnick))
+    return 0;
+
+  /* My user at host (?) */
+  if (!egg_strcasecmp(floodhost, botuserhost))
+    return 0;
+
   m = ismember(chan, floodnick);
+
   /* Do not punish non-existant channel members and IRC services like
    * ChanServ
    */
@@ -221,12 +231,7 @@
   }
   if ((thr == 0) || (lapse == 0))
     return 0;                   /* no flood protection */
-  /* Okay, make sure i'm not flood-checking myself */
-  if (match_my_nick(floodnick))
-    return 0;
-  if (!egg_strcasecmp(floodhost, botuserhost))
-    return 0;
-  /* My user at host (?) */
+
   if ((which == FLOOD_KICK) || (which == FLOOD_DEOP))
     p = floodnick;
   else {
Index: eggdrop1.7/src/mod/server.mod/servmsg.c
diff -u eggdrop1.7/src/mod/server.mod/servmsg.c:1.2 eggdrop1.7/src/mod/server.mod/servmsg.c:1.3
--- eggdrop1.7/src/mod/server.mod/servmsg.c:1.2	Thu Jan 20 19:43:42 2005
+++ eggdrop1.7/src/mod/server.mod/servmsg.c	Sat Jul 30 21:57:54 2005
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.2 2005/01/21 01:43:42 wcc Exp $
+ * $Id: servmsg.c,v 1.3 2005/07/31 02:57:54 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -327,6 +327,14 @@
   struct userrec *u;
   int thr = 0, lapse = 0, atr;
 
+  /* Okay, make sure i'm not flood-checking myself */
+  if (match_my_nick(floodnick))
+    return 0;
+
+  /* My user at host (?) */
+  if (!egg_strcasecmp(floodhost, botuserhost))
+    return 0;
+
   u = get_user_by_host(from);
   atr = u ? u->flags : 0;
   if (atr & (USER_BOT | USER_FRIEND))
@@ -348,11 +356,7 @@
   }
   if ((thr == 0) || (lapse == 0))
     return 0;                   /* No flood protection */
-  /* Okay, make sure i'm not flood-checking myself */
-  if (match_my_nick(floodnick))
-    return 0;
-  if (!egg_strcasecmp(floodhost, botuserhost))
-    return 0;                   /* My user at host (?) */
+
   p = strchr(floodhost, '@');
   if (p) {
     p++;
@@ -695,7 +699,7 @@
      * check that it's not just a truncation of the full nick.
      */
     if (strncmp(botname, origbotname, strlen(botname))) {
-      /* See if my nickname is in use and if if my nick is right.  */
+      /* See if my nickname is in use and if if my nick is right. */
       alt = get_altbotnick();
       if (alt[0] && egg_strcasecmp(botname, alt))
         dprintf(DP_SERVER, "ISON :%s %s %s\n", botname, origbotname, alt);
Index: eggdrop1.7/src/patch.h
diff -u eggdrop1.7/src/patch.h:1.31 eggdrop1.7/src/patch.h:1.32
--- eggdrop1.7/src/patch.h:1.31	Mon Jul 25 22:31:29 2005
+++ eggdrop1.7/src/patch.h	Sat Jul 30 21:57:54 2005
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.31 2005/07/26 03:31:29 wcc Exp $
+ * $Id: patch.h,v 1.32 2005/07/31 02:57:54 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1122348116");            /* current unixtime */
+patch("1122778698");            /* current unixtime */
 /*
  *
  *
  */
-patch("logfile-refactoring");
+patch("sync1");
 /*
  *
  *
Index: eggdrop1.7/src/tclegg.h
diff -u eggdrop1.7/src/tclegg.h:1.3 eggdrop1.7/src/tclegg.h:1.4
--- eggdrop1.7/src/tclegg.h:1.3	Thu Jan 20 19:43:40 2005
+++ eggdrop1.7/src/tclegg.h	Sat Jul 30 21:57:54 2005
@@ -2,7 +2,7 @@
  * tclegg.h
  *   stuff used by tcl.c and tclhash.c
  *
- * $Id: tclegg.h,v 1.3 2005/01/21 01:43:40 wcc Exp $
+ * $Id: tclegg.h,v 1.4 2005/07/31 02:57:54 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -32,23 +32,20 @@
 #  include "proto.h" /* This file needs this */
 #endif
 
-/* Match types for check_tcl_bind
- */
+/* Match types for check_tcl_bind: */
 #define MATCH_PARTIAL       0
 #define MATCH_EXACT         1
 #define MATCH_MASK          2
 #define MATCH_CASE          3
 
-/* Bitwise 'or' these:
- */
-#define BIND_USE_ATTR       0x04
-#define BIND_STACKABLE      0x08
-#define BIND_HAS_BUILTINS   0x10
-#define BIND_WANTRET        0x20
-#define BIND_ALTER_ARGS     0x40
+/* Bitwise 'or' these: */
+#define BIND_USE_ATTR       0x04 /* Check flags. */
+#define BIND_STACKABLE      0x08 /* Stackable. */
+#define BIND_HAS_BUILTINS   0x10 /* ??? Used for dcc, fil, msg, pub. */
+#define BIND_WANTRET        0x20 /* Return tcl proc result. */
+#define BIND_ALTER_ARGS     0x40 /* Use return value from tcl proc as args for command. */
 
-/* Return values
- */
+/* Return values: */
 #define BIND_NOMATCH    0
 #define BIND_AMBIGUOUS  1
 #define BIND_MATCHED    2       /* But the proc couldn't be found */
Index: eggdrop1.7/src/tclhash.c
diff -u eggdrop1.7/src/tclhash.c:1.14 eggdrop1.7/src/tclhash.c:1.15
--- eggdrop1.7/src/tclhash.c:1.14	Thu Jan 20 19:43:40 2005
+++ eggdrop1.7/src/tclhash.c	Sat Jul 30 21:57:54 2005
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id: tclhash.c,v 1.14 2005/01/21 01:43:40 wcc Exp $
+ * $Id: tclhash.c,v 1.15 2005/07/31 02:57:54 wcc Exp $
  */
 
 #include "main.h"
@@ -685,6 +685,7 @@
   x = Tcl_VarEval(interp, proc, param, NULL);
   Context;
   if (x == TCL_ERROR) {
+    /* FIXME: we really should be able to log longer errors */
     if (strlen(interp->result) > 400)
       interp->result[400] = 0;
     putlog(LOG_TCLERROR, "*", "Tcl error [%s]: %s", proc, interp->result);
@@ -943,8 +944,11 @@
   Tcl_SetVar(interp, "_note1", (char *) from, 0);
   Tcl_SetVar(interp, "_note2", (char *) to, 0);
   Tcl_SetVar(interp, "_note3", (char *) text, 0);
-  x = check_tcl_bind(H_note, to, 0, " $_note1 $_note2 $_note3", MATCH_EXACT);
-  return (x == BIND_MATCHED || x == BIND_EXECUTED || x == BIND_EXEC_LOG);
+
+  x = check_tcl_bind(H_note, to, 0, " $_note1 $_note2 $_note3",
+                     MATCH_MASK | BIND_STACKABLE | BIND_WANTRET);
+
+  return (x == BIND_EXEC_LOG);
 }
 
 void check_tcl_listen(const char *cmd, int idx)
----------------------- End of diff -----------------------



More information about the Changes mailing list