[cvslog] (2005-11-17 17:58:36 UTC) Module eggdrop1.6: Change committed!

cvslog cvs at tsss.org
Thu Nov 17 11:58:37 CST 2005


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2005-11-17 17:58:36 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/botmsg.c src/flags.c src/patch.h src/tcl.c
     src/tclegg.h src/tclhash.c src/users.c src/mod/irc.mod/tclirc.c
     src/mod/server.mod/server.c

Log message:

* WTF is Max OS?

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.622 eggdrop1.6/doc/UPDATES1.6:1.623
--- eggdrop1.6/doc/UPDATES1.6:1.622	Thu Oct 20 20:56:33 2005
+++ eggdrop1.6/doc/UPDATES1.6	Thu Nov 17 11:58:26 2005
@@ -1,4 +1,4 @@
-$Id: UPDATES1.6,v 1.622 2005/10/21 01:56:33 wcc Exp $
+$Id: UPDATES1.6,v 1.623 2005/11/17 17:58:26 wcc Exp $
 
 Eggdrop Changes (since v1.6.0)
     _____________________________________________________________________
@@ -25,7 +25,7 @@
     - Valgrind doesn't bitch about init_uptime() now.
     * Patch by: Wcc
 
-    - Dns.mod should compile on Max OS X now. Thanks to Netscrape @ EFNet for
+    - Dns.mod should compile on Mac OS X now. Thanks to Netscrape @ EFNet for
       testing.
     * Found by: various - Patch by: Wcc
 
Index: eggdrop1.6/src/botmsg.c
diff -u eggdrop1.6/src/botmsg.c:1.33 eggdrop1.6/src/botmsg.c:1.34
--- eggdrop1.6/src/botmsg.c:1.33	Tue Feb  8 10:13:11 2005
+++ eggdrop1.6/src/botmsg.c	Thu Nov 17 11:58:26 2005
@@ -5,7 +5,7 @@
  *
  * by Darrin Smith (beldin at light.iinet.net.au)
  *
- * $Id: botmsg.c,v 1.33 2005/02/08 16:13:11 tothwolf Exp $
+ * $Id: botmsg.c,v 1.34 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -754,7 +754,7 @@
 }
 
 /* This part of add_note is more relevant to the botnet than
- * to the notes file
+ * to the notes file.
  */
 int add_note(char *to, char *from, char *msg, int idx, int echo)
 {
@@ -762,12 +762,17 @@
   char *p, botf[81], ss[81], ssf[81];
   struct userrec *u;
 
-  /* note length + PRIVMSG header + nickname + date  must be <512  */
+  /* Notes have a length limit. Note + PRIVMSG header + nick + date must
+   * be less than 512.
+   */
   if (strlen(msg) > 450)
-    msg[450] = 0;               /* Notes have a limit */
+    msg[450] = 0;
 
+  /* Is this a cross-bot note? If it is, 'to' will be of the format
+   * 'user at bot'.
+   */
   p = strchr(to, '@');
-  if (p != NULL) {              /* Cross-bot note */
+  if (p != NULL) {
     char x[21];
 
     *p = 0;
@@ -868,7 +873,7 @@
 
       if (dcc[i].type == &DCC_CHAT) {
 
-        /* Only check away if it's not from a bot */
+        /* Only check away if it's not from a bot. */
         if (dcc[i].u.chat->away != NULL && idx != -2) {
           aok = 0;
 
@@ -909,19 +914,14 @@
   }
 
   if (idx == -2)
-    return NOTE_OK;             /* Error msg from a tandembot: don't store */
+    return NOTE_OK; /* Error msg from a tandembot: don't store. */
 
-  /* Call tcl_storenote */
+  /* Call 'storenote' Tcl command. */
+  simple_sprintf(ss, "%d", (idx >= 0) ? dcc[idx].sock : -1);
   Tcl_SetVar(interp, "_from", from, 0);
-  Tcl_SetVar(interp, "_to", to, 0);
-  Tcl_SetVar(interp, "_data", msg, 0);
-  if (idx >= 0)
-    simple_sprintf(ss, "%d", dcc[idx].sock);
-  else
-    simple_sprintf(ss, "%d", -1);
-
-  Tcl_SetVar(interp, "_idx", ss, 0);
-
+  Tcl_SetVar(interp, "_to",   to,   0);
+  Tcl_SetVar(interp, "_data", msg,  0);
+  Tcl_SetVar(interp, "_idx",  ss,   0);
   if (Tcl_VarEval(interp, "storenote", " $_from $_to $_data $_idx", NULL) ==
       TCL_OK) {
 
@@ -929,7 +929,7 @@
       status = NOTE_FWD;
 
     /* User is away in all sessions -- just notify the user that a
-     * message arrived and was stored. (only oldest session is notified.)
+     * message arrived and was stored (only oldest session is notified).
      */
     if (status == NOTE_AWAY)
       dprintf(iaway, "*** %s.\n", BOT_NOTEARRIVED);
@@ -937,5 +937,6 @@
     return status;
   }
 
+  /* If we haven't returned anything else by now, assume an error occurred. */
   return NOTE_ERROR;
 }
Index: eggdrop1.6/src/flags.c
diff -u eggdrop1.6/src/flags.c:1.30 eggdrop1.6/src/flags.c:1.31
--- eggdrop1.6/src/flags.c:1.30	Thu Feb  3 09:34:21 2005
+++ eggdrop1.6/src/flags.c	Thu Nov 17 11:58:26 2005
@@ -2,7 +2,7 @@
  * flags.c -- handles:
  *   all the flag matching/conversion functions in one neat package :)
  *
- * $Id: flags.c,v 1.30 2005/02/03 15:34:21 tothwolf Exp $
+ * $Id: flags.c,v 1.31 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -546,7 +546,7 @@
     int hav = have->global;
 
     /* Exception 1 - global +d/+k cant use -|-, unless they are +p */
-    if (!req->chan && !req->global &&!req->udef_global && !req->udef_chan) {
+    if (!req->chan && !req->global && !req->udef_global && !req->udef_chan) {
       if (!allow_dk_cmds) {
         if (glob_party(*have))
           return 1;
Index: eggdrop1.6/src/mod/irc.mod/tclirc.c
diff -u eggdrop1.6/src/mod/irc.mod/tclirc.c:1.47 eggdrop1.6/src/mod/irc.mod/tclirc.c:1.48
--- eggdrop1.6/src/mod/irc.mod/tclirc.c:1.47	Sun Aug 28 23:39:25 2005
+++ eggdrop1.6/src/mod/irc.mod/tclirc.c	Thu Nov 17 11:58:26 2005
@@ -1,7 +1,7 @@
 /*
  * tclirc.c -- part of irc.mod
  *
- * $Id: tclirc.c,v 1.47 2005/08/29 04:39:25 wcc Exp $
+ * $Id: tclirc.c,v 1.48 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -51,7 +51,7 @@
   f = (minus.global || minus.udef_global || minus.chan || minus.udef_chan ||
        minus.bot);
   /* Return empty set if asked for flags but flags don't exist */
-  if (!plus.global &&!plus.udef_global && !plus.chan && !plus.udef_chan &&
+  if (!plus.global && !plus.udef_global && !plus.chan && !plus.udef_chan &&
       !plus.bot && !f)
     return TCL_OK;
   minus.match = plus.match ^ (FR_AND | FR_OR);
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.122 eggdrop1.6/src/mod/server.mod/server.c:1.123
--- eggdrop1.6/src/mod/server.mod/server.c:1.122	Wed Aug 31 21:23:49 2005
+++ eggdrop1.6/src/mod/server.mod/server.c	Thu Nov 17 11:58:26 2005
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.122 2005/09/01 02:23:49 wcc Exp $
+ * $Id: server.c,v 1.123 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -461,7 +461,7 @@
     nextcmd = newsplit(&nextmsg);
     nextto = newsplit(&nextmsg);
     len = strlen(nextto);
-    if (strcmp(to, nextto) &&!strcmp(cmd, nextcmd) && !strcmp(msg, nextmsg) &&
+    if (strcmp(to, nextto) && !strcmp(cmd, nextcmd) && !strcmp(msg, nextmsg) &&
         ((strlen(cmd) + strlen(victims) + strlen(nextto) + strlen(msg) + 2) <
         510) && (!stack_limit || cmd_count < stack_limit - 1)) {
       cmd_count++;
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1174 eggdrop1.6/src/patch.h:1.1175
--- eggdrop1.6/src/patch.h:1.1174	Mon Nov 14 22:56:04 2005
+++ eggdrop1.6/src/patch.h	Thu Nov 17 11:58:26 2005
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1174 2005/11/15 04:56:04 wcc Exp $
+ * $Id: patch.h,v 1.1175 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1132030556");            /* current unixtime */
+patch("1132252871");            /* current unixtime */
 /*
  *
  *
  */
-patch("runautotools");
+patch("UPDATES-fix");
 /*
  *
  *
Index: eggdrop1.6/src/tcl.c
diff -u eggdrop1.6/src/tcl.c:1.84 eggdrop1.6/src/tcl.c:1.85
--- eggdrop1.6/src/tcl.c:1.84	Mon Feb  7 19:08:19 2005
+++ eggdrop1.6/src/tcl.c	Thu Nov 17 11:58:26 2005
@@ -4,7 +4,7 @@
  *   Tcl initialization
  *   getting and setting Tcl/eggdrop variables
  *
- * $Id: tcl.c,v 1.84 2005/02/08 01:08:19 tothwolf Exp $
+ * $Id: tcl.c,v 1.85 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -444,7 +444,7 @@
     Tcl_CreateObjCommand(interp, table[i].name, table[i].func, (ClientData) 0,
                          NULL);
 }
-#endif /* USE_TCL_OBJ */
+#endif
 
 static tcl_strings def_tcl_strings[] = {
   {"botnet-nick",     botnetnick,     HANDLEN,                 0},
@@ -687,7 +687,7 @@
   add_tcl_commands(tclmisc_cmds);
 #ifdef USE_TCL_OBJ
   add_tcl_objcommands(tclmisc_objcmds);
-#endif /* USE_TCL_OBJ */
+#endif
   add_tcl_commands(tcldns_cmds);
 }
 
Index: eggdrop1.6/src/tclegg.h
diff -u eggdrop1.6/src/tclegg.h:1.28 eggdrop1.6/src/tclegg.h:1.29
--- eggdrop1.6/src/tclegg.h:1.28	Mon Feb  7 19:08:19 2005
+++ eggdrop1.6/src/tclegg.h	Thu Nov 17 11:58:26 2005
@@ -2,7 +2,7 @@
  * tclegg.h
  *   stuff used by tcl.c and tclhash.c
  *
- * $Id: tclegg.h,v 1.28 2005/02/08 01:08:19 tothwolf Exp $
+ * $Id: tclegg.h,v 1.29 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -26,10 +26,10 @@
 #ifndef _EGG_TCLEGG_H
 #define _EGG_TCLEGG_H
 
-#include "lush.h"    /* Include this here, since it's needed in this file */
+#include "lush.h"
 
 #ifndef MAKING_MODS
-#  include "proto.h" /* This file needs this */
+#  include "proto.h"
 #endif
 
 
@@ -37,25 +37,23 @@
  * Wow, this is old...CMD_LEAVE goes back to before version 0.9.
  * This is for partyline and filesys 'quit'.
  */
-#define CMD_LEAVE    (Function)(-1)
+#define CMD_LEAVE (Function)(-1)
 
 
-/*
- * Match types for check_tcl_bind
- */
-#define MATCH_PARTIAL       0
-#define MATCH_EXACT         1
-#define MATCH_MASK          2
-#define MATCH_CASE          3
+/* 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:
  */
 
-/* Check flags; make sure the user has the flags required */
+/* Check flags; make sure the user has the flags required. */
 #define BIND_USE_ATTR       0x04
 
-/* Bind is stackable; more than one bind can have the same name */
+/* Bind is stackable; more than one bind can have the same name. */
 #define BIND_STACKABLE      0x08
 
 /* Additional flag checking; check for +d, +k, etc.
@@ -66,14 +64,16 @@
 /* FIXME: Should this really be used for the dcc and fil types since
  *        they are only available to the partyline/filesys (+p/+x)?
  *        Eggdrop's revenge code does not add default flags when
- *        adding a user record for +d or +k flags. */
+ *        adding a user record for +d or +k flags.
+ */
 /* FIXME: This type actually seems to be obsolete. This was originally
- *        used to check built-in types in Eggdrop version 1.0. */
+ *        used to check built-in types in Eggdrop version 1.0.
+ */
 #define BIND_HAS_BUILTINS   0x10
 
-/* Want return; we want to know if the proc returns 1
+/* Want return; we want to know if the proc returns 1.
  * Side effect: immediate return; don't do any further
- * processing of stacked binds
+ * processing of stacked binds.
  */
 #define BIND_WANTRET        0x20
 
@@ -81,14 +81,12 @@
 #define BIND_ALTER_ARGS     0x40
 
 /* Stacked return; we want to know if any proc returns 1,
- * and also want to process all stacked binds
+ * and also want to process all stacked binds.
  */
 #define BIND_STACKRET       0x80
 
 
-/*
- * Return values
- */
+/* Return values. */
 #define BIND_NOMATCH    0
 #define BIND_AMBIGUOUS  1
 #define BIND_MATCHED    2       /* But the proc couldn't be found */
@@ -97,7 +95,7 @@
 #define BIND_QUIT       5       /* CMD_LEAVE 'quit' from partyline or filesys */
 
 /* Extra commands are stored in Tcl hash tables (one hash table for each type
- * of command: msg, dcc, etc)
+ * of command: msg, dcc, etc).
  */
 typedef struct timer_str {
   struct timer_str *next;
Index: eggdrop1.6/src/tclhash.c
diff -u eggdrop1.6/src/tclhash.c:1.57 eggdrop1.6/src/tclhash.c:1.58
--- eggdrop1.6/src/tclhash.c:1.57	Wed Nov 16 23:21:34 2005
+++ eggdrop1.6/src/tclhash.c	Thu Nov 17 11:58:26 2005
@@ -7,7 +7,7 @@
  *   (non-Tcl) procedure lookups for msg/dcc/file commands
  *   (Tcl) binding internal procedures to msg/dcc/file commands
  *
- * $Id: tclhash.c,v 1.57 2005/11/17 05:21:34 tothwolf Exp $
+ * $Id: tclhash.c,v 1.58 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -824,12 +824,9 @@
           x = trigger_bind(tc->func_name, param, tm->mask);
 
           if (match_type & BIND_ALTER_ARGS) {
-
             if (interp->result == NULL || !interp->result[0])
               return x;
-
           } else if ((match_type & BIND_STACKRET) && x == BIND_EXEC_LOG) {
-
             /* If we have multiple commands/triggers, and if any of the
              * commands return 1, we store the result so we can return it
              * after processing all stacked binds.
@@ -837,9 +834,7 @@
             if (!result)
               result = x;
             continue;
-
           } else if ((match_type & BIND_WANTRET) && x == BIND_EXEC_LOG)
-
             /* Return immediately if any commands return 1 */
             return x;
         }
Index: eggdrop1.6/src/users.c
diff -u eggdrop1.6/src/users.c:1.47 eggdrop1.6/src/users.c:1.48
--- eggdrop1.6/src/users.c:1.47	Mon Jan  3 14:01:45 2005
+++ eggdrop1.6/src/users.c	Thu Nov 17 11:58:26 2005
@@ -10,7 +10,7 @@
  *
  * dprintf'ized, 9nov1995
  *
- * $Id: users.c,v 1.47 2005/01/03 20:01:45 paladin Exp $
+ * $Id: users.c,v 1.48 2005/11/17 17:58:26 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -577,10 +577,10 @@
     user.match = pls.match = FR_GLOBAL | FR_BOT | FR_CHAN;
     break_down_flags(mtch, &pls, &mns);
     mns.match = pls.match ^ (FR_AND | FR_OR);
-    if (!mns.global &&!mns.udef_global && !mns.chan && !mns.udef_chan &&
+    if (!mns.global && !mns.udef_global && !mns.chan && !mns.udef_chan &&
         !mns.bot) {
       nomns = 1;
-      if (!pls.global &&!pls.udef_global && !pls.chan && !pls.udef_chan &&
+      if (!pls.global && !pls.udef_global && !pls.chan && !pls.udef_chan &&
           !pls.bot) {
         /* happy now BB you weenie :P */
         dprintf(idx, "Unknown flag specified for matching!!\n");
----------------------- End of diff -----------------------



More information about the Changes mailing list