All pastes #614439 Raw Edit

AA player_message hack with clie

public text v1 · immutable
·published 2007-07-11 15:34 UTC
rendered paste body
static void PlayerConsoleOut_conf(std::istream &s)
{
                    int receiver = se_ReadUser(s);

		    tString msg_core;
                    msg_core.ReadLine( s, true );
 
                    int current_place=0; // current place in buffer_name.

                     // Check for match
                    int num_matches=-1;

                    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);