From fa06f2af34d68ab3d3531cb819ba4d108944a359 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Wed, 4 Jun 2014 18:58:43 +0200 Subject: [PATCH] Add protocols.irc.certfile Fixes #612. --- src/conf.py | 4 ++++ src/drivers/Socket.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/conf.py b/src/conf.py index ec69d1586..14610f0dd 100644 --- a/src/conf.py +++ b/src/conf.py @@ -1064,6 +1064,10 @@ registerGlobalValue(supybot.protocols.irc, 'strictRfc', a nick such as services@this.network.server then you you should set this to False."""))) +registerGlobalValue(supybot.protocols.irc, 'certfile', + registry.String('', _("""Determines what certificate file (if any) the bot + will use connect with SSL sockets by default."""))) + registerGlobalValue(supybot.protocols.irc, 'umodes', registry.String('', _("""Determines what user modes the bot will request from the server when it first connects. Many people might choose +i; some diff --git a/src/drivers/Socket.py b/src/drivers/Socket.py index 6691d9c8d..9a5ba7da2 100644 --- a/src/drivers/Socket.py +++ b/src/drivers/Socket.py @@ -307,6 +307,8 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin): assert 'ssl' in globals() certfile = getattr(conf.supybot.networks, self.irc.network) \ .certfile() + if not certfile: + certfile = conf.supybot.protocols.irc.certfile() if not certfile: certfile = None elif not os.path.isfile(certfile):