def connect(
        self, host, port=5222, reattempt=False, use_tls=True, use_ssl=False
    ):
        # pylint: disable=W0221
        """
        Connects to the server.

        By default, uses an un-encrypted connection, as it won't connect to an
        OpenFire server otherwise

        :param host: Server host name
        :param port: Server port (default: 5222)
        :param reattempt: If True, tries to connect to the server until it
                         succeeds
        :param use_tls: Use STARTTLS
        :param use_ssl: Server connection is encrypted
        :return: True if connection succeeded
        """
        if not self._expected_server_name:
            # We seem to connect the server anonymously, so SleekXMPP
            # couldn't find the server host name from the JID
            # => give it the given server host name as the expected one
            self._expected_server_name = host

        # Try to connect
        if super(BasicBot, self).connect(
            (host, port), reattempt, use_tls, use_ssl
        ):
            # On success, start the processing thread
            self.process(threaded=True)
            return True

        return False
Connects to the server.

        By default, uses an un-encrypted connection, as it won't connect to an
        OpenFire server otherwise

        :param host: Server host name
        :param port: Server port (default: 5222)
        :param reattempt: If True, tries to connect to the server until it
                         succeeds
        :param use_tls: Use STARTTLS
        :param use_ssl: Server connection is encrypted
        :return: True if connection succeeded