Annotate

core/rostermanager.lua @ 80:523ac742cc19

Fixed: rostermanager.lua now returns the module
author Waqas Hussain <waqas20@gmail.com>
date Wed, 08 Oct 2008 21:10:18 +0500
parent 6:7ad47ce20394
child 101:c690fa382743
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
1
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
2 local mainlog = log;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
3 local function log(type, message)
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
4 mainlog(type, "rostermanager", message);
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
5 end
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
6
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
7 local setmetatable = setmetatable;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
8 local format = string.format;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
9 local loadfile, setfenv, pcall = loadfile, setfenv, pcall;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
10
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
11 require "util.datamanager"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
12
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
13 local datamanager = datamanager;
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
14
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
15 module "rostermanager"
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
16
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
17 function getroster(username, host)
3
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
18 return {
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
19 ["mattj@localhost"] = true,
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
20 ["tobias@getjabber.ath.cx"] = true,
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
21 ["waqas@getjabber.ath.cx"] = true,
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
22 ["thorns@getjabber.ath.cx"] = true,
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
23 ["idw@getjabber.ath.cx"] = true,
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
24 }
f674eb704134 "Shared roster" - well, kind of :)
matthew
parents: 0
diff changeset
25 -- return datamanager.load(username, host, "roster") or {};
0
3e3171b59028 First commit, where do you want to go tomorrow?
matthew
parents:
diff changeset
26 end
80
523ac742cc19 Fixed: rostermanager.lua now returns the module
Waqas Hussain <waqas20@gmail.com>
parents: 6
diff changeset
27
523ac742cc19 Fixed: rostermanager.lua now returns the module
Waqas Hussain <waqas20@gmail.com>
parents: 6
diff changeset
28 return _M;