- /* Falsche Anzahl Parameter? */
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( 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_Name( Client ));
-} /* IRC_QUIT */
-
-
-GLOBAL BOOLEAN IRC_PING( CLIENT *Client, REQUEST *Req )
-{
- CLIENT *to;
-
- 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_Name( Client ));
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
-
- to = Client_Search( Req->argv[0] );
-
- if( to ) return IRC_WriteStrClient( Client, This_Server, "PONG :%s", Client_Name( Client ));
- else return IRC_WriteStrClient( Client, This_Server, ERR_NOSUCHNICK_MSG, Client_Name( Client ), Req->argv[0] );
-} /* 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_Name( Client ));
- if( Req->argc > 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( 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 );
- return CONNECTED;
-} /* IRC_PONG */
-
-
-GLOBAL BOOLEAN IRC_MOTD( CLIENT *Client, REQUEST *Req )
-{
- assert( Client != NULL );
- assert( Req != NULL );
-
- if( ! Check_Valid_User( Client )) return CONNECTED;
-
- /* Falsche Anzahl Parameter? */
- if( Req->argc != 0 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
-
- return Show_MOTD( Client );
-} /* IRC_MOTD */
-
-
-GLOBAL BOOLEAN IRC_PRIVMSG( CLIENT *Client, REQUEST *Req )
-{
- CLIENT *to;
-
- assert( Client != NULL );
- assert( Req != NULL );
-
- if( ! Check_Valid_User( Client )) return CONNECTED;
-
- /* Falsche Anzahl Parameter? */
- if( Req->argc == 0 ) return IRC_WriteStrClient( Client, This_Server, ERR_NORECIPIENT_MSG, Client_Name( Client ), Req->command );
- if( Req->argc == 1 ) return IRC_WriteStrClient( Client, This_Server, ERR_NOTEXTTOSEND_MSG, Client_Name( Client ));
- if( Req->argc > 2 ) return IRC_WriteStrClient( Client, This_Server, ERR_NEEDMOREPARAMS_MSG, Client_Name( Client ), Req->command );
-
- to = Client_Search( Req->argv[0] );
- if( to )
- {
- /* Okay, Ziel ist ein User */
- return IRC_WriteStrClient( to, Client, "PRIVMSG %s :%s", to->nick, Req->argv[1] );