]> git.sesse.net Git - vlc/commitdiff
luarc: use info instead of error when exiting, don't try to interpret empty lines...
authorRafaël Carré <funman@videolan.org>
Mon, 5 Nov 2007 01:48:25 +0000 (01:48 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 5 Nov 2007 01:48:25 +0000 (01:48 +0000)
share/luaintf/rc.lua

index 19a6268ae4933acc70fe14015cdbe0842b64a27b..93cb8cc31a5c5123f03040ae1aece8b85ba6d11a 100644 (file)
@@ -111,7 +111,7 @@ end
 function shutdown(name,client)
     client:append("Bye-bye!")
     h:broadcast("Shutting down.")
-    vlc.msg.err("Requested shutdown.")
+    vlc.msg.info("Requested shutdown.")
     vlc.quit()
 end
 
@@ -466,17 +466,17 @@ while not vlc.should_die() do
         local input = client:recv(1000)
         if string.match(input,"\n$") then
             client.buffer = string.gsub(client.buffer..input,"\r?\n$","")
-            done = true
         elseif client.buffer == ""
            and ((client.type == host.client_type.stdio and input == "")
            or  (client.type == host.client_type.net and input == "\004")) then
             -- Caught a ^D
             client.buffer = "quit"
-            done = true
         else
             client.buffer = client.buffer .. input
         end
-        if done then
+        if client.buffer == "" then
+            client:send( client.env.prompt )
+        else
             local cmd,arg = split_input(client.buffer)
             client.buffer = ""
             client:switch_status(host.status.write)