core/s2smanager.lua

changeset 157
f4e9b6ec34b0
parent 148
4c0dcd245d34
child 161
8c1a8a3e32e8
--- a/core/s2smanager.lua	Fri Oct 24 14:47:23 2008 +0100
+++ b/core/s2smanager.lua	Fri Oct 24 14:59:04 2008 +0100
@@ -20,6 +20,8 @@
 
 local dialback_secret = "This is very secret!!! Ha!";
 
+local srvmap = { ["gmail.com"] = "talk.google.com", ["identi.ca"] = "longlance.controlezvous.ca" };
+
 module "s2smanager"
 
 function connect_host(from_host, to_host)
@@ -64,6 +66,7 @@
 		
 		local conn, handler = socket.tcp()
 		--FIXME: Below parameters (ports/ip) are incorrect (use SRV)
+		to_host = srvmap[to_host] or to_host;
 		conn:connect(to_host, 5269);
 		conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx );
 		host_session.conn = conn;

mercurial