vlc | branch: master | Pierre Ynard <[email protected]> | Sun Mar 20 03:31:19 2011 +0100| [79ab8c8bf24e9cda53d2b75c2268626498443ac1] | committer: Pierre Ynard
luatelnet: use dedicated strip function > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79ab8c8bf24e9cda53d2b75c2268626498443ac1 --- share/lua/intf/telnet.lua | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/share/lua/intf/telnet.lua b/share/lua/intf/telnet.lua index 759f256..b8901be 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 _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
