[cvslog] (2002-08-08 20:49:43 UTC) Module eggdrop1.6: Change committed

cvslog cvs at tsss.org
Thu Aug 8 15:50:04 CST 2002


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2002-08-08 20:49:42 UTC
Commited by: Will Buckner <wcc at techmonkeys.org>

Modified files:
     doc/UPDATES1.6 src/botnet.c src/cmds.c src/dccutil.c src/patch.h
     src/users.c src/mod/irc.mod/cmdsirc.c

Log message:

Eggdrop should now compile on systems without snprintf(). Patch by BHAB.

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/UPDATES1.6
diff -u eggdrop1.6/doc/UPDATES1.6:1.389 eggdrop1.6/doc/UPDATES1.6:1.390
--- eggdrop1.6/doc/UPDATES1.6:1.389	Thu Aug  8 14:31:44 2002
+++ eggdrop1.6/doc/UPDATES1.6	Thu Aug  8 15:49:31 2002
@@ -1,10 +1,11 @@
-$Id: UPDATES1.6,v 1.389 2002/08/08 19:31:44 wcc Exp $
+$Id: UPDATES1.6,v 1.390 2002/08/08 20:49:31 wcc Exp $
 
 Changes in Eggdrop: (since v1.6.0)
 ----------------------------------
 
 1.6.13
 Found by  Fixed by  What...
+          BHAB      compile fix for systems that do not support snprintf()
 various   Wcc/      fixed a bug where if the bot is kicked while channel information is
           [sL]      still being received, the bot will think it's still on the channel and
                     not rejoin
Index: eggdrop1.6/src/botnet.c
diff -u eggdrop1.6/src/botnet.c:1.43 eggdrop1.6/src/botnet.c:1.44
--- eggdrop1.6/src/botnet.c:1.43	Tue Jul  9 00:40:55 2002
+++ eggdrop1.6/src/botnet.c	Thu Aug  8 15:49:32 2002
@@ -7,7 +7,7 @@
  *   linking, unlinking, and relaying to another bot
  *   pinging the bots periodically and checking leaf status
  *
- * $Id: botnet.c,v 1.43 2002/07/09 05:40:55 guppy Exp $
+ * $Id: botnet.c,v 1.44 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -464,11 +464,11 @@
   if(nicklen < 9) nicklen = 9;
   if(botnicklen < 9) botnicklen = 9;
 
-  snprintf(format, sizeof format, "%%-%us   %%-%us  %%s\n", 
+  egg_snprintf(format, sizeof format, "%%-%us   %%-%us  %%s\n", 
                                   nicklen, botnicklen);
   dprintf(idx, format, " Nick", 	" Bot",      " Host");
   dprintf(idx, format, "----------",	"---------", "--------------------");
-  snprintf(format, sizeof format, "%%c%%-%us %%c %%-%us  %%s%%s\n", 
+  egg_snprintf(format, sizeof format, "%%c%%-%us %%c %%-%us  %%s%%s\n", 
                                   nicklen, botnicklen);
   for (i = 0; i < dcc_total; i++)
     if (dcc[i].type == &DCC_CHAT) {
Index: eggdrop1.6/src/cmds.c
diff -u eggdrop1.6/src/cmds.c:1.81 eggdrop1.6/src/cmds.c:1.82
--- eggdrop1.6/src/cmds.c:1.81	Tue Jul  9 00:40:55 2002
+++ eggdrop1.6/src/cmds.c	Thu Aug  8 15:49:32 2002
@@ -3,7 +3,7 @@
  *   commands from a user via dcc
  *   (split in 2, this portion contains no-irc commands)
  *
- * $Id: cmds.c,v 1.81 2002/07/09 05:40:55 guppy Exp $
+ * $Id: cmds.c,v 1.82 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -126,12 +126,12 @@
     if (dcc[i].type == &DCC_CHAT)
       if (dcc[i].u.chat->channel == chan) {
 	if (atr & USER_OWNER) {
-	  snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us %%s", nicklen);
+	  egg_snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us %%s", nicklen);
 	  sprintf(s, format,
 		  dcc[i].sock, (geticon(i) == '-' ? ' ' : geticon(i)),
 		  dcc[i].nick, dcc[i].host);
 	} else {
-	  snprintf(format, sizeof format, "  %%c%%-%us %%s", nicklen);
+	  egg_snprintf(format, sizeof format, "  %%c%%-%us %%s", nicklen);
 	  sprintf(s, format,
 		  (geticon(i) == '-' ? ' ' : geticon(i)),
 		  dcc[i].nick, dcc[i].host);
@@ -166,14 +166,14 @@
       }
       egg_strftime(s, 14, "%d %b %H:%M", localtime(&dcc[i].timeval));
       if (atr & USER_OWNER) {
-        snprintf(format, sizeof format, "  [%%.2lu]  %%s%%c%%-%us (%%s) %%s\n", 
+        egg_snprintf(format, sizeof format, "  [%%.2lu]  %%s%%c%%-%us (%%s) %%s\n", 
 			    nicklen);
 	dprintf(idx, format,
 		dcc[i].sock, dcc[i].status & STAT_CALLED ? "<-" : "->",
 		dcc[i].status & STAT_SHARE ? '+' : ' ',
 		dcc[i].nick, s, dcc[i].u.bot->version);
       } else {
-        snprintf(format, sizeof format, "  %%s%%c%%-%us (%%s) %%s\n", nicklen);
+        egg_snprintf(format, sizeof format, "  %%s%%c%%-%us (%%s) %%s\n", nicklen);
 	dprintf(idx, format,
 		dcc[i].status & STAT_CALLED ? "<-" : "->",
 		dcc[i].status & STAT_SHARE ? '+' : ' ',
@@ -188,11 +188,11 @@
 	dprintf(idx, "Other people on the bot:\n");
       }
       if (atr & USER_OWNER) {
-	snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us ", nicklen);
+	egg_snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us ", nicklen);
 	sprintf(s, format, dcc[i].sock,
 		(geticon(i) == '-' ? ' ' : geticon(i)), dcc[i].nick);
       } else {
-	snprintf(format, sizeof format, "  %%c%%-%us ", nicklen);
+	egg_snprintf(format, sizeof format, "  %%c%%-%us ", nicklen);
 	sprintf(s, format,
 		(geticon(i) == '-' ? ' ' : geticon(i)), dcc[i].nick);
       }
@@ -228,13 +228,13 @@
 	dprintf(idx, "Other people on the bot:\n");
       }
       if (atr & USER_OWNER) {
-	snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us (files) %%s", 
+	egg_snprintf(format, sizeof format, "  [%%.2lu]  %%c%%-%us (files) %%s", 
 				nicklen);
 	sprintf(s, format,
 		dcc[i].sock, dcc[i].status & STAT_CHAT ? '+' : ' ',
 		dcc[i].nick, dcc[i].host);
       } else {
-	snprintf(format, sizeof format, "  %%c%%-%us (files) %%s", nicklen);
+	egg_snprintf(format, sizeof format, "  %%c%%-%us (files) %%s", nicklen);
 	sprintf(s, format,
 		dcc[i].status & STAT_CHAT ? '+' : ' ',
 		dcc[i].nick, dcc[i].host);
Index: eggdrop1.6/src/dccutil.c
diff -u eggdrop1.6/src/dccutil.c:1.39 eggdrop1.6/src/dccutil.c:1.40
--- eggdrop1.6/src/dccutil.c:1.39	Tue Jul  9 00:40:55 2002
+++ eggdrop1.6/src/dccutil.c	Thu Aug  8 15:49:32 2002
@@ -6,7 +6,7 @@
  *   memory management for dcc structures
  *   timeout checking for dcc connections
  *
- * $Id: dccutil.c,v 1.39 2002/07/09 05:40:55 guppy Exp $
+ * $Id: dccutil.c,v 1.40 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -327,13 +327,13 @@
   }
   if(nicklen < 9) nicklen = 9;
   
-  snprintf(format, sizeof format, "%%-4s %%-8s %%-5s %%-%us %%-17s %%s\n", 
+  egg_snprintf(format, sizeof format, "%%-4s %%-8s %%-5s %%-%us %%-17s %%s\n", 
                           nicklen);
   dprintf(zidx, format, "SOCK", "ADDR",     "PORT",  "NICK", "HOST", "TYPE");
   dprintf(zidx, format, "----", "--------", "-----", "---------", 
                         "-----------------", "----");
 
-  snprintf(format, sizeof format, "%%-4d %%08X %%5d %%-%us %%-17s %%s\n", 
+  egg_snprintf(format, sizeof format, "%%-4d %%08X %%5d %%-%us %%-17s %%s\n", 
                           nicklen);
   /* Show server */
   for (i = 0; i < dcc_total; i++) {
Index: eggdrop1.6/src/mod/irc.mod/cmdsirc.c
diff -u eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.40 eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.41
--- eggdrop1.6/src/mod/irc.mod/cmdsirc.c:1.40	Wed Aug  7 17:05:49 2002
+++ eggdrop1.6/src/mod/irc.mod/cmdsirc.c	Thu Aug  8 15:49:32 2002
@@ -2,7 +2,7 @@
  * chancmds.c -- part of irc.mod
  *   handles commands directly relating to channel interaction
  *
- * $Id: cmdsirc.c,v 1.40 2002/08/07 22:05:49 wcc Exp $
+ * $Id: cmdsirc.c,v 1.41 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -686,7 +686,7 @@
     if(maxhandlen < 9) maxhandlen = 9;
     
     dprintf(idx, "(n = owner, m = master, o = op, d = deop, b = bot)\n");
-    snprintf(format, sizeof format, " %%-%us %%-%us %%-6s %%-5s %%s\n", 
+    egg_snprintf(format, sizeof format, " %%-%us %%-%us %%-6s %%-5s %%s\n", 
 			maxnicklen, maxhandlen);
     dprintf(idx, format, "NICKNAME", "HANDLE", " JOIN", "IDLE", "USER at HOST");
     for (m = chan->channel.member; m && m->nick[0]; m = m->next) {
@@ -783,13 +783,13 @@
       else
 	chanflag = ' ';
       if (chan_issplit(m)) {
-        snprintf(format, sizeof format, 
+        egg_snprintf(format, sizeof format, 
 			"%%c%%-%us %%-%us %%s %%c     <- netsplit, %%lus\n", 
 			maxnicklen, maxhandlen);
 	dprintf(idx, format, chanflag, m->nick, handle, s, atrflag,
 		now - (m->split));
       } else if (!rfc_casecmp(m->nick, botname)) {
-        snprintf(format, sizeof format, 
+        egg_snprintf(format, sizeof format, 
 			"%%c%%-%us %%-%us %%s %%c     <- it's me!\n", 
 			maxnicklen, maxhandlen);
 	dprintf(idx, format, chanflag, m->nick, handle, s, atrflag);
@@ -803,7 +803,7 @@
 	  egg_snprintf(s1, sizeof s1, "%2lum", ((now - (m->last)) / 60));
 	else
 	  strncpyz(s1, "   ", sizeof s1);
-	snprintf(format, sizeof format, "%%c%%-%us %%-%us %%s %%c %%s  %%s\n", 
+	egg_snprintf(format, sizeof format, "%%c%%-%us %%-%us %%s %%c %%s  %%s\n", 
 			maxnicklen, maxhandlen);
 	dprintf(idx, format, chanflag, m->nick,	handle, s, atrflag, s1, 
 		    m->userhost);
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.801 eggdrop1.6/src/patch.h:1.802
--- eggdrop1.6/src/patch.h:1.801	Thu Aug  8 14:31:45 2002
+++ eggdrop1.6/src/patch.h	Thu Aug  8 15:49:32 2002
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.801 2002/08/08 19:31:45 wcc Exp $
+ * $Id: patch.h,v 1.802 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1028834594");		/* current unixtime */
+patch("1028839310");		/* current unixtime */
 /*
  *
  *
  */
-patch("botkickedfix");
+patch("snprintf_fix");
 /*
  *
  *
Index: eggdrop1.6/src/users.c
diff -u eggdrop1.6/src/users.c:1.34 eggdrop1.6/src/users.c:1.35
--- eggdrop1.6/src/users.c:1.34	Tue Jul  9 00:40:55 2002
+++ eggdrop1.6/src/users.c	Thu Aug  8 15:49:32 2002
@@ -10,7 +10,7 @@
  *
  * dprintf'ized, 9nov1995
  *
- * $Id: users.c,v 1.34 2002/07/09 05:40:55 guppy Exp $
+ * $Id: users.c,v 1.35 2002/08/08 20:49:32 wcc Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -497,7 +497,7 @@
     else
       egg_strftime(s1, 6, "%H:%M", localtime(&li->laston));
   }
-  snprintf(format, sizeof format, "%%-%us %%-5s%%5d %%-15s %%s (%%-10.10s)\n", 
+  egg_snprintf(format, sizeof format, "%%-%us %%-5s%%5d %%-15s %%s (%%-10.10s)\n", 
                           HANDLEN);
   dprintf(idx, format, u->handle, 
 	  get_user(&USERENTRY_PASS, u) ? "yes" : "no", n, s, s1,
@@ -520,7 +520,7 @@
       fr.chan = ch->flags;
       fr.udef_chan = ch->flags_udef;
       build_flags(s, &fr, NULL);
-      snprintf(format, sizeof format, "%%%us  %%-18s %%-15s %%s\n", HANDLEN-9);
+      egg_snprintf(format, sizeof format, "%%%us  %%-18s %%-15s %%s\n", HANDLEN-9);
       dprintf(idx, format, " ", ch->channel, s, s1);
       if (ch->info != NULL)
 	dprintf(idx, "    INFO: %s\n", ch->info);
@@ -545,7 +545,7 @@
     dprintf(idx, "%s.\n", USERF_NOMATCH);
     return;
   }
-  snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", 
+  egg_snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", 
                           HANDLEN);
   dprintf(idx, format, "HANDLE");
   tell_user(idx, u, master);
@@ -565,7 +565,7 @@
 
   dprintf(idx, "*** %s '%s':\n", MISC_MATCHING, mtch);
   cnt = 0;
-  snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", 
+  egg_snprintf(format, sizeof format, "%%-%us PASS NOTES FLAGS           LAST\n", 
                       HANDLEN);
   dprintf(idx, format, "HANDLE");
   if (start > 1)
----------------------- End of diff -----------------------



More information about the Changes mailing list