Erik Dalén avatar Erik Dalén committed 0b4e1a8

Add SSL support to SingleServerIRCBot

Comments (0)

Files changed (1)

     have operator or voice modes.  The "database" is kept in the
     self.channels attribute, which is an IRCDict of Channels.
     """
-    def __init__(self, server_list, nickname, realname, reconnection_interval=60):
+    def __init__(self, server_list, nickname, realname, reconnection_interval=60, ssl=False):
         """Constructor for SingleServerIRCBot objects.
 
         Arguments:
 
             dcc_connections -- A list of initiated/accepted DCC
             connections.
+
+            ssl -- Connect to server using SSL
         """
 
         super(SingleServerIRCBot, self).__init__()
         self.channels = IRCDict()
+        self.ssl = ssl
         self.server_list = server_list
         if not reconnection_interval or reconnection_interval < 0:
             reconnection_interval = 2 ** 31
                          self.server_list[0][1],
                          self._nickname,
                          password,
-                         ircname=self._realname)
+                         ircname=self._realname,
+                         ssl=self.ssl)
         except irc.client.ServerConnectionError:
             pass
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.