diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-06-27 04:44:27 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-06-27 04:44:27 +0100 |
commit | 29169a015f67d31329fdb23ace68caaff118e316 (patch) | |
tree | fbd548d974ae8403d584fa9b8f665a2b6f52d14e | |
parent | 852c7a62b1d7ffb7a95f7bb5d42a66ce1444b3f6 (diff) | |
parent | a01f4e62493a01afa9813c2197596854b62c7b71 (diff) | |
download | prosody-29169a015f67d31329fdb23ace68caaff118e316.tar.gz prosody-29169a015f67d31329fdb23ace68caaff118e316.zip |
Automated merge with http://waqas.ath.cx:8000/
-rw-r--r-- | net/xmppclient_listener.lua | 4 | ||||
-rw-r--r-- | plugins/mod_message.lua | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index 617f0467..5e1a1ba3 100644 --- a/net/xmppclient_listener.lua +++ b/net/xmppclient_listener.lua @@ -95,7 +95,7 @@ local function session_close(session, reason) end session.send("</stream:stream>"); session.conn.close(); - xmppclient.disconnect(session.conn, "stream error"); + xmppclient.disconnect(session.conn, reason.condition or reason or "session closed"); end end @@ -136,7 +136,7 @@ function xmppclient.disconnect(conn, err) local session = sessions[conn]; if session then (session.log or log)("info", "Client disconnected: %s", err); - sm_destroy_session(session); + sm_destroy_session(session, err); sessions[conn] = nil; session = nil; collectgarbage("collect"); diff --git a/plugins/mod_message.lua b/plugins/mod_message.lua index 72ccfdd0..b56aef0a 100644 --- a/plugins/mod_message.lua +++ b/plugins/mod_message.lua @@ -67,3 +67,5 @@ module:hook("message/bare", function(data) return process_to_bare(stanza.attr.to or (origin.username..'@'..origin.host), origin, stanza); end); + +module:add_feature("msgoffline"); |