diff -Naur openarena-engine-source-0.8.x-28/code//server/sv_ccmds.c openarena-engine-source-0.8.x-28-rcon-tell-patch/code//server/sv_ccmds.c --- openarena-engine-source-0.8.x-28/code//server/sv_ccmds.c 2011-12-24 12:29:37 +0000 +++ openarena-engine-source-0.8.x-28-rcon-tell-patch/code//server/sv_ccmds.c 2012-02-05 16:17:45 +0000 @@ -1171,6 +1171,48 @@ /* ================== +SV_ConTell_f + +Based on Urban Terror implementation +================== +*/ +static void SV_ConTell_f(void) { + char *p; + char text[1024]; + client_t *cl; + + // make sure server is running + if ( !com_sv_running->integer ) { + Com_Printf( "Server is not running.\n" ); + return; + } + + if ( Cmd_Argc() < 3 ) { + Com_Printf ("Usage: tell \n"); + return; + } + + cl = SV_GetPlayerByNum(); + if ( !cl ) { + return; + } + + strcpy (text, "console_tell: "); + p = Cmd_ArgsFrom(2); + + if ( *p == '"' ) { + p++; + p[strlen(p)-1] = 0; + } + + strcat(text, p); + + SV_SendServerCommand(cl, "chat \"%s\"", text); +} + + +/* +================== SV_Heartbeat_f Also called by SV_DropClient, SV_DirectConnect, and SV_SpawnServer @@ -1303,8 +1345,9 @@ Cmd_AddCommand ("killserver", SV_KillServer_f); if( com_dedicated->integer ) { Cmd_AddCommand ("say", SV_ConSay_f); + Cmd_AddCommand ("tell", SV_ConTell_f); } Cmd_AddCommand("rehashbans", SV_RehashBans_f); Cmd_AddCommand("listbans", SV_ListBans_f); Cmd_AddCommand("banaddr", SV_BanAddr_f);