[NeoStats-Devel] [Commits] r22 - Trunk

[email protected]
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Author: DNB
Date: Fri Apr 15 21:45:14 2005
New Revision: 22

Modified:
   Trunk/common.c
Log:
fix client joining/parting channels

Modified: Trunk/common.c
==============================================================================
--- Trunk/common.c	(original)
+++ Trunk/common.c	Fri Apr 15 21:45:14 2005
@@ -46,12 +46,12 @@
 
 	irc_chanprivmsg (gs_bot, gameroom[gr], "\0037GAME OVER");
 	for (i = 0 ; i < GS_GAME_TOTAL ; i++) {
-		if (!ircstrcasecmp (gameroom[i], gameroom[gr]) && i != gr) {
-			i = -1;
+		if (i != gr && gamestatus[i] != GS_GAME_STOPPED && !ircstrcasecmp (gameroom[i], gameroom[gr])) {
+			i = (GS_GAME_TOTAL + 1);
 			break;
 		}
 	}
-	if (i != -1) {
+	if (i <= GS_GAME_TOTAL) {
 		irc_part (gs_bot, gameroom[gr], NULL);
 	}
 	gameroom[gr][0] = '\0';
@@ -88,13 +88,13 @@
 	}
 	if (cj == GS_GAME_CHANNEL_JOIN) {
 		for (i = 0 ; i < GS_GAME_TOTAL ; i++) {
-			if (!ircstrcasecmp (gameroom[i], gameroom[gn]) && i != gn) {
-				i = -1;
+			if (i != gn && gamestatus[i] != GS_GAME_STOPPED && !ircstrcasecmp (gameroom[i], gameroom[gn])) {
+				i = (GS_GAME_TOTAL + 1);
 				break;
 			}
 		}
-		if (i != -1) {
-			irc_join (gs_bot, gameroom[gn], "+o");
+		if (i <= GS_GAME_TOTAL) {
+			irc_join (gs_bot, cn, "+o");
 		}
 	}
 	countdowntime[gn] = ct;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.