core/rostermanager.lua

Sun, 05 Oct 2008 19:10:21 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 05 Oct 2008 19:10:21 +0100
branch
tls
changeset 66
018705d57f09
parent 6
7ad47ce20394
child 80
523ac742cc19
permissions
-rw-r--r--

Working TLS!

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

mercurial