strip \n from own chat messages (again :-)
This commit is contained in:
parent
9957c0a6e1
commit
c697394b1c
1 changed files with 6 additions and 7 deletions
|
@ -64,16 +64,15 @@ var echo_message = func(msg, callsign)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add the chat to the chat history.
|
# Add the chat to the chat history.
|
||||||
var lchat = getprop("/sim/multiplay/chat-history");
|
var lchat = getprop("/sim/multiplay/chat-history") or "";
|
||||||
|
|
||||||
if (lchat == nil)
|
if (lchat)
|
||||||
{
|
{
|
||||||
|
lchat = string.trim(lchat, 0, string.isxspace);
|
||||||
|
msg = lchat ~ "\n" ~ msg;
|
||||||
|
}
|
||||||
|
|
||||||
setprop("/sim/multiplay/chat-history", msg);
|
setprop("/sim/multiplay/chat-history", msg);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setprop("/sim/multiplay/chat-history", lchat ~ "\n" ~ msg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
settimer(func {
|
settimer(func {
|
||||||
|
|
Loading…
Add table
Reference in a new issue