]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-channel.c
Don't include conn.h, conn-func.h is enough.
[ngircd-alex.git] / src / ngircd / irc-channel.c
index f20ef1912818d258745191150d06def8e3ac06ae..7e21c1308c496dd6a55651d9d1833ec92b5ac960 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-channel.c,v 1.32 2005/09/02 15:46:49 alex Exp $";
+static char UNUSED id[] = "$Id: irc-channel.c,v 1.35 2006/03/16 20:14:16 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -75,7 +75,6 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
        /* Channel-Namen durchgehen */
        while (channame)
        {
-               Log(LOG_INFO, "channame=%s, key=%s", channame, key ? key : "-");
                chan = NULL; flags = NULL;
 
                /* wird der Channel neu angelegt? */
@@ -98,14 +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( Client_Type( Client ) == CLIENT_USER )
-                       {
-                               if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins ))
-                               {
-                                       IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG, Client_ID( Client ), channame );
-                                       return CONNECTED;
-                               }
-                       }
+                       if(( Conf_MaxJoins > 0 ) && ( Channel_CountForUser( Client ) >= Conf_MaxJoins ))
+                               return IRC_WriteStrClient( Client, ERR_TOOMANYCHANNELS_MSG,
+                                                       Client_ID( Client ), channame );
 
                        /* Existiert der Channel bereits, oder wird er im Moment neu erzeugt? */
                        if( is_new_chan )