# HG changeset patch # User Waqas Hussain # Date 1297251353 -18000 # Node ID e4d5a1d3ff44cac677d82e518368920f523927be # Parent 8b81257c9dc50a7f861324247fe9750179f81187 mod_srvinjection: Add support for a wildcard host. diff -r 8b81257c9dc5 -r e4d5a1d3ff44 mod_srvinjection/mod_srvinjection.lua --- a/mod_srvinjection/mod_srvinjection.lua Sun Feb 06 05:05:49 2011 +0100 +++ b/mod_srvinjection/mod_srvinjection.lua Wed Feb 09 16:35:53 2011 +0500 @@ -26,7 +26,7 @@ function adns.lookup(handler, qname, qtype, qclass) if qtype == "SRV" then local host = qname:match("^_xmpp%-server%._tcp%.(.*)%.$"); - local mapping = map[host]; + local mapping = map[host] or mapping["*"]; if mapping then handler(mapping); return;