code: def handle_action(self, channel, nick, msg):
  		"Core message parser and dispatcher"
  
  		messages = ()
  		for handler in Handler.find_matching(msg, channel):
  			exception_handler = functools.partial(
  				self._handle_exception,
  				handler=handler,
  			)
  			rest = handler.process(msg)
  			client = connection = event = None
  			# for regexp handlers
  			match = rest
  			f = handler.attach(locals())
  			results = pmxbot.itertools.generate_results(f)
  			clean_results = pmxbot.itertools.trap_exceptions(results, exception_handler)
  			messages = itertools.chain(messages, clean_results)
  			if not handler.allow_chain:
  				break
  		self._handle_output(channel, messagesf handle_action(self, channel, nick, msg):
  		"Core message parser and dispatcher"
  
  		messages = ()
  		for handler in Handler.find_matching(msg, channel):
  			exception_handler = functools.partial(
  				self._handle_exception,
  				handler=handler,
  			)
  			rest = handler.process(msg)
  			client = connection = event = None
  			# for regexp handlers
  			match = rest
  			f = handler.attach(locals())
  			results = pmxbot.itertools.generate_results(f)
  			clean_results = pmxbot.itertools.trap_exceptions(results, exception_handler)
  			messages = itertools.chain(messages, clean_results)
  			if not handler.allow_chain:
  				break
  		self._handle_output(channel, messages)
docs: Core message parser and dispatcher