diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-22 21:09:25 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-22 21:09:25 +0000 |
commit | 82063a0e17822147dcb9b96fcd0a3a0bfac1c227 (patch) | |
tree | a6ae2ec311b20f83ef97a6b1af6249057fcc05a0 | |
parent | 4c8e3f457d16e6246f851c3f71ad0d957713d616 (diff) | |
download | prosody-82063a0e17822147dcb9b96fcd0a3a0bfac1c227.tar.gz prosody-82063a0e17822147dcb9b96fcd0a3a0bfac1c227.zip |
mod_console: Update for new net.server API
-rw-r--r-- | plugins/mod_console.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index 82045232..209981ce 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -33,7 +33,7 @@ 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; @@ -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(); |