repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 4000e01b285bdd2fe40056ae49211e0048639a74:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 4000e01b285bdd2fe40056ae49211e0048639a74
Author: Florian Westphal 
Date:   Thu Mar 16 20:14:16 2006 +0000

    corrected return value

diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 30a7d642df3424c8248a6db125c52e7280a8de73..
index ..7e21c1308c496dd6a55651d9d1833ec92b5ac960 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -14,7 +14,7 @@

 #include "portab.h"

-static char UNUSED id[] = "$Id: irc-channel.c,v 1.34 2006/03/16 19:56:34 fw Exp $";
+static char UNUSED id[] = "$Id: irc-channel.c,v 1.35 2006/03/16 20:14:16 fw Exp $";

 #include "imp.h"
 #include 
@@ -97,11 +97,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 		if( Client_Type( Client ) == CLIENT_USER )
 		{
 			/* Test if the user has reached his maximum channel count */
-			if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins )) {
-				IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG,
+			if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins ))
+				return IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG,
 							Client_ID( Client ), channame );
-				return CONNECTED;
-			}

 			/* Existiert der Channel bereits, oder wird er im Moment neu erzeugt? */
 			if( is_new_chan )

-----END OF PAGE-----