1
0
Fork 0

strip \n from own chat messages (again :-)

This commit is contained in:
mfranz 2009-01-27 20:12:19 +00:00
parent 9957c0a6e1
commit c697394b1c

View file

@ -64,16 +64,15 @@ var echo_message = func(msg, callsign)
}
# 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);
}
else
{
setprop("/sim/multiplay/chat-history", lchat ~ "\n" ~ msg);
}
}
settimer(func {