Commits

Erik Dalén committed 0b4e1a8

Add SSL support to SingleServerIRCBot

  • Participants
  • Parent commits 4a3a435

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