Add protocols.irc.certfile

Fixes #612.
This commit is contained in:
nyuszika7h 2014-06-04 18:58:43 +02:00
parent 7d716aa8f3
commit fa06f2af34
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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):