break multiline texts before echoing
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4349 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+10
-1
@@ -201,7 +201,16 @@ void toserver(char *text)
|
||||
addmsg(toteam ? SV_TEAMTEXT : SV_TEXT, "rs", text);
|
||||
}
|
||||
|
||||
void echo(char *text) { conoutf("%s", text); }
|
||||
void echo(char *text)
|
||||
{
|
||||
const char *s = strtok(text, "\n");
|
||||
do
|
||||
{
|
||||
conoutf("%s", s ? s : "");
|
||||
s = strtok(NULL, "\n");
|
||||
}
|
||||
while(s);
|
||||
}
|
||||
|
||||
COMMAND(echo, ARG_CONC);
|
||||
COMMANDN(say, toserver, ARG_CONC);
|
||||
|
||||
Reference in New Issue
Block a user