Software /
code /
prosody
Comparison
core/presencemanager.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 |
---|---|
19 | 19 |
20 | 20 |
21 | 21 |
22 local log = require "util.logger".init("presencemanager") | 22 local log = require "util.logger".init("presencemanager") |
23 | 23 |
24 local tostring = tostring; | |
25 local require = require; | 24 local require = require; |
26 local pairs, ipairs = pairs, ipairs; | 25 local pairs, ipairs = pairs, ipairs; |
27 local t_concat = table.concat; | 26 local t_concat = table.concat; |
28 local s_find = string.find; | 27 local s_find = string.find; |
29 local tonumber = tonumber; | 28 local tonumber = tonumber; |
120 end | 119 end |
121 stanza.attr.to = nil; -- reset it | 120 stanza.attr.to = nil; -- reset it |
122 else | 121 else |
123 log("error", "presence recieved from client with no roster"); | 122 log("error", "presence recieved from client with no roster"); |
124 end | 123 end |
125 | |
126 if origin.conntimetotal then | |
127 local session = origin; | |
128 origin.log("BLAH", "***********\n\n\n\n\n\n****************"); | |
129 origin.send(st.stanza("message", { from = session.host, to=session.full_jid, type = "normal" }):body("Your login took "..tostring(session.conntimetotal).." seconds")); | |
130 origin.conntimetotal = nil; | |
131 end | |
132 | |
133 end | 124 end |
134 | 125 |
135 function send_presence_of_available_resources(user, host, jid, recipient_session, core_route_stanza) | 126 function send_presence_of_available_resources(user, host, jid, recipient_session, core_route_stanza) |
136 local h = hosts[host]; | 127 local h = hosts[host]; |
137 local count = 0; | 128 local count = 0; |