Comparison

plugins/mod_console.lua @ 565:3a49d85cafbc

Backed out changeset 099d8a102deb (committed too much)
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Dec 2008 19:49:16 +0000
parent 563:099d8a102deb
child 615:4ae3e81513f3
comparison
equal deleted inserted replaced
563:099d8a102deb 565:3a49d85cafbc
31 31
32 function console:new_session(conn) 32 function console:new_session(conn)
33 local w = conn.write; 33 local w = conn.write;
34 local session = { conn = conn; 34 local session = { conn = conn;
35 send = function (t) w(tostring(t)); end; 35 send = function (t) w(tostring(t)); end;
36 print = function (t) w("| "..tostring(t).."\r\n"); end; 36 print = function (t) w("| "..tostring(t).."\n"); end;
37 disconnect = function () conn.close(); end; 37 disconnect = function () conn.close(); end;
38 }; 38 };
39 session.env = setmetatable({}, default_env_mt); 39 session.env = setmetatable({}, default_env_mt);
40 40
41 -- Load up environment with helper objects 41 -- Load up environment with helper objects