Software /
code /
prosody
Comparison
main.lua @ 36:62998e5319e3
Moved hosts to a config file, still need better config though
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 01 Oct 2008 22:11:28 +0100 |
parent | 34:fd693ef5d978 |
child | 37:06eadafafefa |
comparison
equal
deleted
inserted
replaced
35:3faa593c7e0f | 36:62998e5319e3 |
---|---|
6 require "lxp" | 6 require "lxp" |
7 | 7 |
8 function log(type, area, message) | 8 function log(type, area, message) |
9 print(type, area, message); | 9 print(type, area, message); |
10 end | 10 end |
11 | |
12 dofile "lxmppd.cfg" | |
13 | |
14 sessions = {}; | |
11 | 15 |
12 require "core.stanza_dispatch" | 16 require "core.stanza_dispatch" |
13 require "core.xmlhandlers" | 17 require "core.xmlhandlers" |
14 require "core.rostermanager" | 18 require "core.rostermanager" |
15 require "core.offlinemessage" | 19 require "core.offlinemessage" |
28 local format = string.format; | 32 local format = string.format; |
29 local st = stanza; | 33 local st = stanza; |
30 local init_xmlhandlers = xmlhandlers.init_xmlhandlers; | 34 local init_xmlhandlers = xmlhandlers.init_xmlhandlers; |
31 ------------------------------ | 35 ------------------------------ |
32 | 36 |
33 sessions = {}; | 37 |
34 hosts = { | |
35 ["localhost"] = { | |
36 type = "local"; | |
37 connected = true; | |
38 sessions = {}; | |
39 }; | |
40 ["getjabber.ath.cx"] = { | |
41 type = "local"; | |
42 connected = true; | |
43 sessions = {}; | |
44 }; | |
45 } | |
46 | 38 |
47 local hosts, users = hosts, users; | 39 local hosts, users = hosts, users; |
48 | |
49 local ssl_ctx = { mode = "server", protocol = "sslv23", key = "/home/matthew/ssl_cert/server.key", | |
50 certificate = "/home/matthew/ssl_cert/server.crt", capath = "/etc/ssl/certs", verify = "none", } | |
51 | |
52 | 40 |
53 function connect_host(host) | 41 function connect_host(host) |
54 hosts[host] = { type = "remote", sendbuffer = {} }; | 42 hosts[host] = { type = "remote", sendbuffer = {} }; |
55 end | 43 end |
56 | 44 |