Posted: Wed Jul 11, 2007 6:50 pm |
|
and here is the fix
static void PlayerConsoleOut_conf(std::istream &s)
{
int receiver = se_ReadUser(s);
tString msg_core;
msg_core.ReadLine( s, true );
tColoredString toServer;
se_AppendChat( toServer, msg_core );
toServer << '\n';
// log locally
sn_ConsoleOut(toServer,0);
// send to receiver
sn_ConsoleOut(toServer, receiver);
return;
}
static tConfItemFunc PlayerConsoleOut_c("PLAYER_MESSAGE",&PlayerConsoleOut_conf); |
so this version of player_message can handle client numbers and doesn't repeat the code to get the client num a given player has
this version obeys to the same rules as kick, ban, kill, silence, voice, allow_team_change_player, disallow_team_change_player like wrtl says
btw, he also said that
| wrtlprnft, in #armagetron wrote: |
| with your version ed's scripts will screw up if you have a player named “1”, but with the player ID 7 |
which is true