core/rostermanager.lua

Thu, 09 Oct 2008 20:28:39 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 09 Oct 2008 20:28:39 +0100
changeset 92
0261260cf9a7
parent 80
523ac742cc19
child 101
c690fa382743
permissions
-rw-r--r--

Updated pull script for new repo

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;

mercurial