def _init(self, server, nick, user, real_name, password, port=None,
              tls=True, tls_verify=True,
              proxy=False, proxy_type='SOCKS5', proxy_server=None,
              proxy_port=None, proxy_username=None, proxy_password=None):
        """
        Connect and register with the IRC server and -
            set server-related information variables.
        Required arguments:
        * server - Server to connect to.
        * nick - Nick to use.
            If a tuple/list is specified it will try to use the first,
            and if the first is already used -
            it will try to use the second and so on.
        * user - Username to use.
        * real_name - Real name to use.
        * password=None - IRC server password.
        Optional arguments:
        * port - Port to use.
        * tls=True - Should we use TLS/SSL?
        * tls_verify=True - Verify the TLS certificate?
                Only works with Python 3.
        * proxy=False - Should we use a proxy?
        * proxy_type='SOCKS5' - Proxy type: SOCKS5, SOCKS4 or HTTP
        * proxy_server=None - Proxy server's address
        * proxy_port=None - Proxy server's port
        * proxy_username=None - If SOCKS5 is used,
                a proxy username/password can be specified.
        * proxy_password=None - If SOCKS5 is used,
                a proxy username/password can be specified.
        """
        with self.lock:
            self.current_nick = nick
            if tls:
                if not port:
                    port = 6697
                self._connect(server, port, tls, tls_verify, proxy, \
                              proxy_type, proxy_server, proxy_port, \
                              proxy_username, proxy_password)
            else:
                if not port:
                    port = 6667

                self._connect(server, port, tls, tls_verify, proxy, \
                              proxy_type, proxy_server, proxy_port, \
                              proxy_username, proxy_password)
            while self.readable(2):
                data = self.recv()
                if data[0] == 'NOTICE':
                        self.server = data[1][0]
                self.con_msg.append(data)

            self._register(nick, user, real_name, password)
            while self.readable(timeout=4):
                rdata = self.recv()
                if rdata[0] == 'UNKNOWN':
                    data = rdata[1][3].replace(':', '', 1)
                    ncode = rdata[1][1]

                    if ncode == '004':
                        info = data.split()
                        self.server = info[0]
                        self.ircd = info[1]
                        self.umodes = info[2]
                        self.cmodes = info[3]
                    elif ncode == '005':
                        version = rdata[1][3].replace(':are supported' + \
                                               'by this server', '')
                        version = version.split()
                        for info in version:
                            try:
                                info = info.split('=')
                                name = info[0]
                                value = info[1]
                                self.version[name] = value

                                if name == 'CHARSET':
                                    self.encoding = value
                            except IndexError:
                                self.version[info[0]] = True
                    elif ncode == '376':
                        self.con_msg.append(rdata)
                        break
                    elif ncode == '422':
                        self.con_msg.append(rdata)
                        break
                else:
                    if rdata[0] == 'NOTICE':
                        self.server = rdata[1][0]
                self.con_msg.append(rdata[1])
            self.motd = tuple(self.motd)
            self.con_msg = tuple(self.con_msg)
            self.connected = True
            self.keep_going = \
                True
Connect and register with the IRC server and -
            set server-related information variables.
        Required arguments:
        * server - Server to connect to.
        * nick - Nick to use.
            If a tuple/list is specified it will try to use the first,
            and if the first is already used -
            it will try to use the second and so on.
        * user - Username to use.
        * real_name - Real name to use.
        * password=None - IRC server password.
        Optional arguments:
        * port - Port to use.
        * tls=True - Should we use TLS/SSL?
        * tls_verify=True - Verify the TLS certificate?
                Only works with Python 3.
        * proxy=False - Should we use a proxy?
        * proxy_type='SOCKS5' - Proxy type: SOCKS5, SOCKS4 or HTTP
        * proxy_server=None - Proxy server's address
        * proxy_port=None - Proxy server's port
        * proxy_username=None - If SOCKS5 is used,
                a proxy username/password can be specified.
        * proxy_password=None - If SOCKS5 is used,
                a proxy username/password can be specified.