Software /
code /
prosody
Changeset
2145:daeb6ebf304c
mod_console: Update for new net.server API
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Nov 2009 21:09:25 +0000 |
parents | 2144:8e59d37a0e68 |
children | 2146:5c54097ef84a |
files | plugins/mod_console.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_console.lua Sun Nov 22 21:55:58 2009 +0500 +++ b/plugins/mod_console.lua Sun Nov 22 21:09:25 2009 +0000 @@ -33,7 +33,7 @@ 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; @@ -53,7 +53,7 @@ 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 @@ 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();