Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 101:c690fa382743
Added some roster management functions
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 12 Oct 2008 17:40:03 +0500 |
parent | 77:531b981f2d17 |
child | 112:df54cab4ff9c |
comparison
equal
deleted
inserted
replaced
100:ca7bad346cde | 101:c690fa382743 |
---|---|
10 | 10 |
11 local modulemanager = require "core.modulemanager"; | 11 local modulemanager = require "core.modulemanager"; |
12 local log = require "util.logger".init("sessionmanager"); | 12 local log = require "util.logger".init("sessionmanager"); |
13 local error = error; | 13 local error = error; |
14 local uuid_generate = require "util.uuid".uuid_generate; | 14 local uuid_generate = require "util.uuid".uuid_generate; |
15 local rm_getroster = require "core.rostermanager".getroster | 15 local rm_load_roster = require "core.rostermanager".load_roster; |
16 | 16 |
17 local newproxy = newproxy; | 17 local newproxy = newproxy; |
18 local getmetatable = getmetatable; | 18 local getmetatable = getmetatable; |
19 | 19 |
20 module "sessionmanager" | 20 module "sessionmanager" |
90 | 90 |
91 session.resource = resource; | 91 session.resource = resource; |
92 session.full_jid = session.username .. '@' .. session.host .. '/' .. resource; | 92 session.full_jid = session.username .. '@' .. session.host .. '/' .. resource; |
93 hosts[session.host].sessions[session.username].sessions[resource] = session; | 93 hosts[session.host].sessions[session.username].sessions[resource] = session; |
94 | 94 |
95 session.roster = rm_getroster(session.username, session.host); | 95 session.roster = rm_load_roster(session.username, session.host); |
96 | 96 |
97 return true; | 97 return true; |
98 end | 98 end |
99 | 99 |
100 function streamopened(session, attr) | 100 function streamopened(session, attr) |