Mercurial > prosody-modules
view mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua @ 890:7ac1b8a799be
mod_carbons_adhoc: Initial commit.
This module will add an Adhoc-command by which a user can see if Message
Carbons (XEP-0280) are generated for his clients and also which version
is used for the individual client. Clients which receive copies as per
mod_carbons_copies will be listed as Version 0 carbons.
author | Michael Holzt <kju@fqdn.org> |
---|---|
date | Sun, 23 Dec 2012 19:36:31 +0100 |
parents | 2b71ba2739e0 |
children | ef859c9d42c4 |
line wrap: on
line source
-- Filter out servers which gets choppy and buggy when it comes to starttls. local bad_servers = module:get_option_set("tls_s2s_blacklist") local bad_servers_ip = module:get_option_set("tls_s2s_blacklist_ip") local function disable_tls_for_baddies_in(event) if bad_servers:contains(event.origin.to_host) or bad_servers_ip:contains(event.origin.conn:ip()) then event.origin.conn.starttls = nil end end local function disable_tls_for_baddies_out(event) if bad_servers:contains(event.origin.from_host) or bad_servers_ip:contains(event.origin.conn:ip()) then event.origin.conn.starttls = nil end end module:hook("s2s-stream-features", disable_tls_for_baddies_out, 10) module:hook("stanza/http://etherx.jabber.org/streams:features", disable_tls_for_baddies_in, 510)