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

cvs at eggheads.org cvs at eggheads.org
Thu Oct 1 15:33:43 CST 2009


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2009-10-01 21:33:43 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     doc/Changes1.6 src/patch.h src/mod/server.mod/server.c
     src/mod/server.mod/servmsg.c

Log message:

Fixed bugs in the tcl_eggserver() and next_server() logic.
Fixes Bugzilla entry #468 ".jump fails if the server list is empty, even when a server name is supplied."

Found by: Dan / Patch by: pseudo

---------------------- diff included ----------------------
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.34 eggdrop1.6/doc/Changes1.6:1.35
--- eggdrop1.6/doc/Changes1.6:1.34	Thu Oct  1 09:52:33 2009
+++ eggdrop1.6/doc/Changes1.6	Thu Oct  1 15:33:33 2009
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.34 2009/10/01 15:52:33 pseudo Exp $
+$Id: Changes1.6,v 1.35 2009/10/01 21:33:33 pseudo Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,11 @@
 
 1.6.20 (CVS):
 
+  - Fixed bugs in the tcl_eggserver() and next_server() logic.
+    Fixes Bugzilla entry #468 ".jump fails if the server list is empty,
+    even when a server name is supplied."
+    Found by: Dan / Patch by: pseudo
+
   - Added a msg-rate config variable, to replace the current #define msgrate
     in server.mod.
   - Added new command [putnow] for bypassing the queueing system to be used
Index: eggdrop1.6/src/mod/server.mod/server.c
diff -u eggdrop1.6/src/mod/server.mod/server.c:1.130 eggdrop1.6/src/mod/server.mod/server.c:1.131
--- eggdrop1.6/src/mod/server.mod/server.c:1.130	Thu Oct  1 09:52:33 2009
+++ eggdrop1.6/src/mod/server.mod/server.c	Thu Oct  1 15:33:33 2009
@@ -2,7 +2,7 @@
  * server.c -- part of server.mod
  *   basic irc server support
  *
- * $Id: server.c,v 1.130 2009/10/01 15:52:33 pseudo Exp $
+ * $Id: server.c,v 1.131 2009/10/01 21:33:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1012,8 +1012,6 @@
   struct server_list *x = serverlist;
   int i = 0;
 
-  if (x == NULL)
-    return;
   /* -1  -->  Go to specified server */
   if (*ptr == -1) {
     for (; x; x = x->next) {
@@ -1047,6 +1045,8 @@
     return;
   }
   /* Find where i am and boogie */
+  if (x == NULL)
+    return;
   i = (*ptr);
   while (i > 0 && x != NULL) {
     x = x->next;
@@ -1414,7 +1414,8 @@
         int servidx = findanyidx(serv);
 
         curserv = -1;
-        next_server(&curserv, dcc[servidx].host, &dcc[servidx].port, "");
+        if (serverlist)
+          next_server(&curserv, dcc[servidx].host, &dcc[servidx].port, "");
       }
       Tcl_Free((char *) list);
     }
Index: eggdrop1.6/src/mod/server.mod/servmsg.c
diff -u eggdrop1.6/src/mod/server.mod/servmsg.c:1.101 eggdrop1.6/src/mod/server.mod/servmsg.c:1.102
--- eggdrop1.6/src/mod/server.mod/servmsg.c:1.101	Wed May  6 13:17:52 2009
+++ eggdrop1.6/src/mod/server.mod/servmsg.c	Thu Oct  1 15:33:33 2009
@@ -1,7 +1,7 @@
 /*
  * servmsg.c -- part of server.mod
  *
- * $Id: servmsg.c,v 1.101 2009/05/06 19:17:52 tothwolf Exp $
+ * $Id: servmsg.c,v 1.102 2009/10/01 21:33:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1237,13 +1237,16 @@
     newserverport = 0;
     newserverpass[0] = 0;
     oldserv = -1;
-  } else
+  } else {
+    if (curserv == -1)
+      curserv = 999;
     pass[0] = 0;
+  }
   if (!cycle_time) {
     struct chanset_t *chan;
     struct server_list *x = serverlist;
 
-    if (!x) {
+    if (!x && !botserverport) {
       putlog(LOG_SERV, "*", "No servers in server list");
       cycle_time = 300;
       return;
Index: eggdrop1.6/src/patch.h
diff -u eggdrop1.6/src/patch.h:1.1212 eggdrop1.6/src/patch.h:1.1213
--- eggdrop1.6/src/patch.h:1.1212	Thu Oct  1 09:52:33 2009
+++ eggdrop1.6/src/patch.h	Thu Oct  1 15:33:33 2009
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.1212 2009/10/01 15:52:33 pseudo Exp $
+ * $Id: patch.h,v 1.1213 2009/10/01 21:33:33 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1254410785");            /* current unixtime */
+patch("1254431396");            /* current unixtime */
 /*
  *
  *
  */
-patch("msgrate");
+patch("jumpfix");
 /*
  *
  *
----------------------- End of diff -----------------------



More information about the Changes mailing list