def METHOD_NAME(self):
    #: Connect to IRC etc.
    self.sock = socket.socket()
    host = self.config.get("host")
    self.sock.connect((host, self.config.get("port")))
    if self.config.get("ssl"):
        self.sock = ssl.wrap_socket(
            self.sock, cert_reqs=ssl.CERT_NONE
        )  # TODO: support certificate
    nick = self.config.get("nick")
    self.log_info(self._("Connecting as"), nick)
    self.sock.send(to_bytes("NICK {}\r\n".format(nick)))
    self.sock.send(to_bytes("USER {} {} bla :{}\r\n".format(nick, host, nick)))
    self.log_info(self._("Connected to"), host)
    for t in self.config.get("owner").split():
        if t.startswith("#"):
            self.sock.send(to_bytes("JOIN {}\r\n".format(t)))
            self.log_info(self._("Joined channel {}").format(to_str(t)))
    self.log_info(self._("Switching to listening mode!"))
    try:
        self.main_loop()
    except IRCError:
        self.sock.send(b"QUIT :byebye\r\n")
        self.sock.close()