]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fixes issue #149
authorChris Porter <redacted>
Mon, 13 Feb 2012 01:24:46 +0000 (01:24 +0000)
committerChris Porter <redacted>
Mon, 13 Feb 2012 01:24:46 +0000 (01:24 +0000)
AUTHORS
config.py.example
qwebirc/ircclient.py

diff --git a/AUTHORS b/AUTHORS
index ff3acc001856a5a1f8fbf1898fed15cf58b763d0..47f7da0fbf31d80ace82596bf08359975c617332 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -6,3 +6,5 @@ Arne Jensen (DarkDeviL) <darkdevil@darkdevil.dk>
 Bas Verhoeven (soczol) <bas@bserved.nl>
 Tom Wesley (tomaw) <tom@tomaw.org>
 Jason Hill (SecretAgent) <secrtagnt@gmail.com>
 Bas Verhoeven (soczol) <bas@bserved.nl>
 Tom Wesley (tomaw) <tom@tomaw.org>
 Jason Hill (SecretAgent) <secrtagnt@gmail.com>
+anarcat
+
index ff33b1179b8a844128a6723d0b648881336380aa..ed210d395c00fcd8224ecd4fdf3bc6e560779f30 100644 (file)
@@ -20,6 +20,11 @@ from qwebirc.config_options import *
 #         Port of IRC server to connect to.
 IRCSERVER, IRCPORT = "irc.myserver.com", 6667
 
 #         Port of IRC server to connect to.
 IRCSERVER, IRCPORT = "irc.myserver.com", 6667
 
+# OPTION: SSLPORT
+#         SSL port of IRC server to connect to.
+#         If this option is uncommented it will override IRCPORT.
+#SSLPORT = 6697
+
 # OPTION: REALNAME
 #         The realname field of IRC clients will be set to this value.
 REALNAME = "http://moo.com/"
 # OPTION: REALNAME
 #         The realname field of IRC clients will be set to this value.
 REALNAME = "http://moo.com/"
index f517430fccb5efe12919c5b4487d5c64458ba715..2fd09c07445b0546ab5fc07e67cd1b10277f1d9c 100644 (file)
@@ -1,6 +1,6 @@
 import twisted, sys, codecs, traceback
 from twisted.words.protocols import irc
 import twisted, sys, codecs, traceback
 from twisted.words.protocols import irc
-from twisted.internet import reactor, protocol, abstract
+from twisted.internet import reactor, protocol, abstract, ssl
 from twisted.web import resource, server
 from twisted.protocols import basic
 from twisted.names.client import Resolver
 from twisted.web import resource, server
 from twisted.protocols import basic
 from twisted.names.client import Resolver
@@ -152,7 +152,10 @@ def createIRC(*args, **kwargs):
     tcpkwargs["bindAddress"] = (config.OUTGOING_IP, 0)
   
   if CONNECTION_RESOLVER is None:
     tcpkwargs["bindAddress"] = (config.OUTGOING_IP, 0)
   
   if CONNECTION_RESOLVER is None:
-    reactor.connectTCP(config.IRCSERVER, config.IRCPORT, f, **tcpkwargs)
+    if hasattr(config, "SSLPORT"):
+      reactor.connectSSL(config.IRCSERVER, config.SSLPORT, f, ssl.ClientContextFactory(), **tcpkwargs)
+    else:
+      reactor.connectTCP(config.IRCSERVER, config.IRCPORT, f, **tcpkwargs)
     return f
 
   def callback(result):
     return f
 
   def callback(result):