Commit 79ab8c8b authored by Pierre Ynard's avatar Pierre Ynard

luatelnet: use dedicated strip function

parent e026f3a4
...@@ -42,6 +42,7 @@ description= ...@@ -42,6 +42,7 @@ description=
* prompt: The prompt. * prompt: The prompt.
]============================================================================] ]============================================================================]
require "common"
require "host" require "host"
--[[ Some telnet command special characters ]] --[[ Some telnet command special characters ]]
...@@ -198,7 +199,7 @@ while not vlc.misc.should_die() do ...@@ -198,7 +199,7 @@ while not vlc.misc.should_die() do
-- get the next command -- get the next command
local index = string.find(client.cmds, "\n") 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) client.cmds = string.sub(client.cmds, index + 1)
-- Remove telnet commands from the command line -- Remove telnet commands from the command line
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment