X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=share%2Flua%2Fintf%2Ftelnet.lua;h=b8901beb1343ae91a8eb9dcc4d36bfd8d8c10c2b;hb=79ab8c8bf24e9cda53d2b75c2268626498443ac1;hp=759f256ca5c183397b9cb72167f0ea4891043fa0;hpb=e026f3a41eb75880e63d614ab940171cd8678a7f;p=vlc diff --git a/share/lua/intf/telnet.lua b/share/lua/intf/telnet.lua index 759f256ca5..b8901beb13 100644 --- a/share/lua/intf/telnet.lua +++ b/share/lua/intf/telnet.lua @@ -42,6 +42,7 @@ description= * prompt: The prompt. ]============================================================================] +require "common" require "host" --[[ Some telnet command special characters ]] @@ -198,7 +199,7 @@ while not vlc.misc.should_die() do -- get the next command local index = string.find(client.cmds, "\n") - client.buffer = string.gsub(string.sub(client.cmds, 0, index - 1), "^%s*(.-)%s*$", "%1") + client.buffer = common.strip(string.sub(client.cmds, 0, index - 1)) client.cmds = string.sub(client.cmds, index + 1) -- Remove telnet commands from the command line