Skip to content

Commit c1a6afc

Browse files
committed
Only display ASCII in dedicated say command
1 parent ac27525 commit c1a6afc

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

code/server/sv_ccmds.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,6 +1260,14 @@ static void SV_ConSay_f(void) {
12601260

12611261
strcat(text, p);
12621262

1263+
// display it the same as the client would see it
1264+
// (non-ASCII are replaced with period in the network protocol)
1265+
for ( p = text; *p; p++ ) {
1266+
if ( *p & 0x80 ) {
1267+
*p = '.';
1268+
}
1269+
}
1270+
12631271
Com_Printf("%s\n", text);
12641272
SV_SendServerCommand(NULL, "chat \"%s\"", text);
12651273
}

0 commit comments

Comments
 (0)