- /* Statuscode? */
- if(( Client_Type( client ) == CLIENT_SERVER ) && ( strlen( Req->command ) == 3 ) && ( atoi( Req->command ) > 100 ))
- {
- /* Command is a status code from an other server */
-
- /* Determine target */
- if( Req->argc > 0 ) target = Client_Search( Req->argv[0] );
- else target = NULL;
- if( ! target )
- {
- /* Status code without target!? */
- if( Req->argc > 0 ) Log( LOG_WARNING, "Unknown target for status code %s: \"%s\"", Req->command, Req->argv[0] );
- else Log( LOG_WARNING, "Unknown target for status code %s!", Req->command );
- return TRUE;
- }
- if( target == Client_ThisServer( ))
- {
- /* This server is the target, ignore it */
- Log( LOG_DEBUG, "Ignored status code %s from \"%s\".", Req->command, Client_ID( client ));
- return TRUE;
- }
-
- /* Determine source */
- if( ! Req->prefix[0] )
- {
- /* Oops, no prefix!? */
- Log( LOG_WARNING, "Got status code %s from \"%s\" without prefix!?", Req->command, Client_ID( client ));
- return TRUE;
- }
- else prefix = Client_Search( Req->prefix );
- if( ! prefix )
- {
- /* Oops, unknown prefix!? */
- Log( LOG_WARNING, "Got status code %s from unknown source: \"%s\"", Req->command, Req->prefix );
- return TRUE;
- }
-
- /* Forward status code */
- strlcpy( str, Req->command, sizeof( str ));
- for( i = 0; i < Req->argc; i++ )
- {
- if( i < Req->argc - 1 ) strlcat( str, " ", sizeof( str ));
- else strlcat( str, " :", sizeof( str ));
- strlcat( str, Req->argv[i], sizeof( str ));
- }
- return IRC_WriteStrClientPrefix( target, prefix, "%s", str );
- }
+ /* Numeric? */
+ client_type = Client_Type(client);
+ if ((client_type == CLIENT_SERVER ||
+ client_type == CLIENT_UNKNOWNSERVER)
+ && strlen(Req->command) == 3 && atoi(Req->command) > 1)
+ return Handle_Numeric(client, Req);