Basically, don't call the function on a connecting player. It's not the best place to use it because as soon as they connect, a menu of some sorts will pop up and block them seeing it. Wait till they spawn, then do your message.
Code:
init()
{
level thread onPlayerConnect();
}
onPlayerConnect()
{
for( ;; )
{
level waittill( "connecting", player );
player.pers[ "welcomed" ] = undefined;
player thread onPlayerSpawned();
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for( ;; )
{
self waittill( "spawned_player" );
self thread WelcomeMessage();
}
}
WelcomeMessage()
{
self endon( "disconnect" );
if( isdefined( self.pers[ "welcomed" ] ) ) return;
self.pers[ "welcomed" ] = true;
self iprintlnBold( "Hello" );
}