aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-11-29 21:33:37 +0100
committerTobias Markmann <tm@ayena.de>2009-11-29 21:33:37 +0100
commitf91009f78a46ad74aa62ff487fa297c06a1ae6a3 (patch)
tree8ef6302fc66fdc48b4f34f58c3bea877d7ee6bee /plugins/mod_console.lua
parent8db68f17623ad29b25c6b5d757a2fb0b3d3005c6 (diff)
parent8fcbba4b0fccb299121083d97cab065e51fba9d1 (diff)
downloadprosody-f91009f78a46ad74aa62ff487fa297c06a1ae6a3.tar.gz
prosody-f91009f78a46ad74aa62ff487fa297c06a1ae6a3.zip
Merge with tip.
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 82045232..9962b3f6 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -33,11 +33,11 @@ end
console = {};
function console:new_session(conn)
- local w = function(s) conn.write(s:gsub("\n", "\r\n")); end;
+ local w = function(s) conn:write(s:gsub("\n", "\r\n")); end;
local session = { conn = conn;
send = function (t) w(tostring(t)); end;
print = function (t) w("| "..tostring(t).."\n"); end;
- disconnect = function () conn.close(); end;
+ disconnect = function () conn:close(); end;
};
session.env = setmetatable({}, default_env_mt);
@@ -53,7 +53,7 @@ end
local sessions = {};
-function console_listener.listener(conn, data)
+function console_listener.onincoming(conn, data)
local session = sessions[conn];
if not session then
@@ -126,7 +126,7 @@ function console_listener.listener(conn, data)
session.send(string.char(0));
end
-function console_listener.disconnect(conn, err)
+function console_listener.ondisconnect(conn, err)
local session = sessions[conn];
if session then
session.disconnect();