- if( Req->argc != 0 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+ if( Req->argc > 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+ /* From aus Prefix ermitteln */
+ if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
+ else from = Client;
+ if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->prefix );
+
+ if( Req->argc == 1 )
+ {
+ /* an anderen Server forwarden */
+ target = Client_Search( Req->argv[0] );
+ if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[0] );
+
+ if( target != Client_ThisServer( ))
+ {
+ /* Ok, anderer Server ist das Ziel: forwarden */
+ return IRC_WriteStrClientPrefix( target, from, "MOTD %s", Req->argv[0] );
+ }
+ }