Commit 021552a2 authored by Rémi Duraffort's avatar Rémi Duraffort

luatelnet: remove the telnet commands from the command line.

parent ffb601a5
...@@ -193,9 +193,6 @@ while not vlc.misc.should_die() do ...@@ -193,9 +193,6 @@ while not vlc.misc.should_die() do
-- Caught a ^D -- Caught a ^D
client.cmds = "quit" client.cmds = "quit"
end end
if client.type == host.client_type.net then
telnet_commands( client )
end
client.buffer = "" client.buffer = ""
-- split the command at the first '\n' -- split the command at the first '\n'
...@@ -208,6 +205,12 @@ while not vlc.misc.should_die() do ...@@ -208,6 +205,12 @@ while not vlc.misc.should_die() do
client.buffer = string.gsub(string.sub(client.cmds, 0, index - 1), "^%s*(.-)%s*$", "%1") client.buffer = string.gsub(string.sub(client.cmds, 0, index - 1), "^%s*(.-)%s*$", "%1")
client.cmds = string.sub(client.cmds, index + 1) client.cmds = string.sub(client.cmds, index + 1)
-- Remove telnet commands from the command line
if client.type == host.client_type.net then
telnet_commands( client )
end
-- Run the command
if client.status == host.status.password then if client.status == host.status.password then
if client.buffer == password then if client.buffer == password then
client:send( IAC..WONT..ECHO.."\r\nWelcome, Master\r\n" ) client:send( IAC..WONT..ECHO.."\r\nWelcome, Master\r\n" )
......
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