-#ifndef STRICT_RFC
- if( Client->type == CLIENT_GOTNICK || Client->type == CLIENT_GOTPASS || Client->type == CLIENT_UNKNOWN )
-#else
- if( Client->type == CLIENT_GOTNICK || Client->type == CLIENT_GOTPASS )
-#endif
- {
- /* Falsche Anzahl Parameter? */
- if( Req->argc != 4 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Nick( Client ), Req->command );
-
- strncpy( Client->user, Req->argv[0], CLIENT_USER_LEN );
- Client->user[CLIENT_USER_LEN - 1] = '\0';
- strncpy( Client->name, Req->argv[3], CLIENT_NAME_LEN );
- Client->name[CLIENT_NAME_LEN - 1] = '\0';
-
- Log( LOG_DEBUG, "Connection %d: got USER command ...", Client->conn_id );
- if( Client->type == CLIENT_GOTNICK ) return Hello_User( Client );
- else Client->type = CLIENT_GOTUSER;
- return CONNECTED;
- }
- else if( Client->type == CLIENT_USER || Client->type == CLIENT_SERVER || Client->type == CLIENT_SERVICE )
- {
- return IRC_WriteStrClient( Client, This_Server, ERR_ALREADYREGISTRED_MSG, Client_Nick( Client ));
- }
- else return IRC_WriteStrClient( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Nick( Client ));
-} /* IRC_USER */
-
-
-GLOBAL BOOLEAN IRC_QUIT( CLIENT *Client, REQUEST *Req )
-{
- assert( Client != NULL );
- assert( Req != NULL );
-
- if( Client->type != CLIENT_SERVER && Client->type != CLIENT_SERVICE )
- {
- /* Falsche Anzahl Parameter? */
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Nick( Client ), Req->command );
-
- Conn_Close( Client->conn_id, "Client wants to quit." );
- return DISCONNECTED;
- }
- else return IRC_WriteStrClient( Client, This_Server, ERR_NOTREGISTERED_MSG, Client_Nick( Client ));
-} /* IRC_QUIT */
-
-
-GLOBAL BOOLEAN IRC_PING( CLIENT *Client, REQUEST *Req )
-{
- assert( Client != NULL );
- assert( Req != NULL );
-
- if( ! Check_Valid_User( Client )) return CONNECTED;
-
- /* Falsche Anzahl Parameter? */
- if( Req->argc < 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NOORIGIN_MSG, Client_Nick( Client ));
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Nick( Client ), Req->command );
-
- return IRC_WriteStrClient( Client, This_Server, "PONG %s :%s", Client_Nick( This_Server), Client_Nick( Client ));
-} /* IRC_PING */
-
-
-GLOBAL BOOLEAN IRC_PONG( CLIENT *Client, REQUEST *Req )
-{
- assert( Client != NULL );
- assert( Req != NULL );
-
- if( ! Check_Valid_User( Client )) return CONNECTED;
-
- /* Falsche Anzahl Parameter? */
- if( Req->argc < 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NOORIGIN_MSG, Client_Nick( Client ));
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Nick( Client ), Req->command );
-
- /* Der Connection-Timestamp wurde schon beim Lesen aus dem Socket
- * aktualisiert, daher muss das hier nicht mehr gemacht werden. */
-
- Log( LOG_DEBUG, "Connection %d: received PONG.", Client->conn_id );