]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/irc-login.c
Added #include for strings.h to fix compiler warnings.
[ngircd.git] / src / ngircd / irc-login.c
index a077f16aa73403ddc2b0e221bb74df61434f6c7d..185dd1246ac868d8255506c115be9023b30af9f9 100644 (file)
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-login.c,v 1.36 2003/12/04 14:05:16 alex Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.38 2004/01/17 03:17:49 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 #include "ngircd.h"
 #include "resolve.h"
@@ -285,6 +286,10 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
 GLOBAL BOOLEAN
 IRC_USER( CLIENT *Client, REQUEST *Req )
 {
+#ifdef IDENTAUTH
+       CHAR *ptr;
+#endif
+
        assert( Client != NULL );
        assert( Req != NULL );
 
@@ -297,6 +302,10 @@ IRC_USER( CLIENT *Client, REQUEST *Req )
                /* Falsche Anzahl Parameter? */
                if( Req->argc != 4 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
+#ifdef IDENTAUTH
+               ptr = Client_User( Client );
+               if( ! ptr || ! *ptr || *ptr == '~' )
+#endif
                Client_SetUser( Client, Req->argv[0], FALSE );
                Client_SetInfo( Client, Req->argv[3] );