From 79ab8c8bf24e9cda53d2b75c2268626498443ac1 Mon Sep 17 00:00:00 2001 From: Pierre Ynard Date: Sun, 20 Mar 2011 03:31:19 +0100 Subject: [PATCH] luatelnet: use dedicated strip function --- share/lua/intf/telnet.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.5