def parse_and_send(self, line): self.logger.debug("Sending: %s" % line) targets, line = util.extract_targets(line) if not targets: targets = self.factory.default_channels for c in targets: if c == '#*': for c in self.factory.all_channels: self.send_to(c, line) else: self.send_to(c, line)
def extract_case(input, expected): out = util.extract_targets(input) assert out == expected