code: def _listen(self):
          
          while True:
              self._inbuffer = self._inbuffer + self.socket.recv(1024)
              # Some IRC servers disregard the RFC and split lines by \n rather than \r\n.
  
              temp = self._inbuffer.split("\n")
              self._inbuffer = temp.pop()
  
              for line in temp:
                  # Strip \r from \r\n for RFC-compliant IRC servers.
                  line = line.rstrip('\r')
                  if self.config['verbose']: print line
                  self._run_listeners(line)
docs: Constantly listens to the input from the server. Since the messages come
          in pieces, we wait until we receive 1 or more full lines to start parsing.
  
          A new line is defined as ending in \r\n in the RFC, but some servers
          separate by \n. This script takes care of both.