]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/client.c
Validate "ServerName" variable.
[ngircd-alex.git] / src / ngircd / client.c
index b317b5beb0dcbb045aec7438fdb09602bbf758de..01ef091668ba9ae73f3fdd1d05ae05c27bf59fd9 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: client.c,v 1.89 2006/03/11 10:43:49 fw Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.91 2006/04/23 10:37:27 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -321,11 +321,9 @@ Client_Destroy( CLIENT *Client, char *LogMsg, char *FwdMsg, bool SendQuit )
                                {
                                        if( c->id[0] ) Log( LOG_NOTICE, "Client \"%s\" unregistered (connection %d): %s", c->id, c->conn_id, txt );
                                        else Log( LOG_NOTICE, "Client unregistered (connection %d): %s", c->conn_id, txt );
-                               }
-                               else
-                               {
-                                       if( c->id[0] ) Log( LOG_WARNING, "Unregistered unknown client \"%s\": %s", c->id, txt );
-                                       else Log( LOG_WARNING, "Unregistered unknown client: %s", c->id, txt );
+                               } else {
+                                       Log(LOG_WARNING, "Unregistered unknown client \"%s\": %s",
+                                                               c->id[0] ? c->id : "(No Nick)", txt );
                                }
                        }
 
@@ -565,27 +563,6 @@ Client_ModeDel( CLIENT *Client, char Mode )
 } /* Client_ModeDel */
 
 
-GLOBAL CLIENT *
-Client_GetFromConn( CONN_ID Idx )
-{
-       /* return Client-Structure that belongs to the local Connection Idx.
-        * If none is found, return NULL.
-        */
-
-       CLIENT *c;
-
-       assert( Idx >= 0 );
-       
-       c = My_Clients;
-       while( c )
-       {
-               if( c->conn_id == Idx ) return c;
-               c = (CLIENT *)c->next;
-       }
-       return NULL;
-} /* Client_GetFromConn */
-
-
 GLOBAL CLIENT *
 Client_Search( char *Nick )
 {