[cvslog] (2006-08-29 02:16:05 UTC) Module eggdrop1.9: Change committed!

cvslog cvs at tsss.org
Mon Aug 28 20:16:06 CST 2006


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.9
Commit time: 2006-08-29 02:16:05 UTC
Commited by: sven

Modified files:
     modules/server/channels.c modules/server/input.c
     modules/server/party_commands.c

Log message:

 * recognize serverconnect even if it has no motd file
 * allow adding a channel the bot is already in
 * fixed channel counter

---------------------- diff included ----------------------
Index: eggdrop1.9/modules/server/channels.c
diff -u eggdrop1.9/modules/server/channels.c:1.38 eggdrop1.9/modules/server/channels.c:1.39
--- eggdrop1.9/modules/server/channels.c:1.38	Mon Nov 28 01:09:28 2005
+++ eggdrop1.9/modules/server/channels.c	Mon Aug 28 21:15:55 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: channels.c,v 1.38 2005-11-28 07:09:28 wcc Exp $";
+static const char rcsid[] = "$Id: channels.c,v 1.39 2006-08-29 02:15:55 sven Exp $";
  #endif
 
 #include "server.h"
@@ -64,6 +64,7 @@
 	if (chan->prev) chan->prev->next = chan->next;
 	else channel_head = chan->next;
 	if (chan->next) chan->next->prev = chan->prev;
+	nchannels--;
 }
 
 /* Find or create channel when passed 0 or 1 */
@@ -116,7 +117,6 @@
 	chan = channel_probe(name, 0);
 	if (!chan) return(-1);
 	chan->flags &= ~CHANNEL_STATIC;
-	nchannels--;
 	return(0);
 }
 
Index: eggdrop1.9/modules/server/input.c
diff -u eggdrop1.9/modules/server/input.c:1.39 eggdrop1.9/modules/server/input.c:1.40
--- eggdrop1.9/modules/server/input.c:1.39	Mon Jun 20 21:55:34 2005
+++ eggdrop1.9/modules/server/input.c	Mon Aug 28 21:15:55 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: input.c,v 1.39 2005-06-21 02:55:34 stdarg Exp $";
+static const char rcsid[] = "$Id: input.c,v 1.40 2006-08-29 02:15:55 sven Exp $";
 #endif
 
 #include "server.h"
@@ -569,6 +569,7 @@
 	{NULL, "001", got001},
 	{NULL, "005", got005},
 	{NULL, "376", got376},
+	{NULL, "422", got376},
 	{NULL, "432", got432},
 	{NULL, "433", got433},
 	{NULL, "435", got435},
Index: eggdrop1.9/modules/server/party_commands.c
diff -u eggdrop1.9/modules/server/party_commands.c:1.26 eggdrop1.9/modules/server/party_commands.c:1.27
--- eggdrop1.9/modules/server/party_commands.c:1.26	Tue Dec  6 21:17:49 2005
+++ eggdrop1.9/modules/server/party_commands.c	Mon Aug 28 21:15:55 2006
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: party_commands.c,v 1.26 2005-12-07 03:17:49 wcc Exp $";
+static const char rcsid[] = "$Id: party_commands.c,v 1.27 2006-08-29 02:15:55 sven Exp $";
 #endif
 
 #include "server.h"
@@ -307,10 +307,16 @@
 		return(0);
 	}
 
-	if (channel_lookup(name)) {
-		partymember_printf(p, _("Error: Channel '%s' already exists!"), name);
-		free(name);
-		return(0);
+	chan = channel_lookup(name);
+	if (chan) {
+		if (chan->flags & CHANNEL_STATIC) {
+			partymember_printf(p, _("Error: Channel '%s' already exists!"), name);
+			free(name);
+			return(0);
+		}
+		chan->flags |= CHANNEL_STATIC;
+		partymember_printf(p, _("Channel '%s' has been made permanent."), name);
+		return(BIND_RET_LOG);
 	}
 
 	chan = channel_add(name);
----------------------- End of diff -----------------------



More information about the Changes mailing list