示例#1
0
 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)
示例#2
0
def extract_case(input, expected):
    out = util.extract_targets(input)

    assert out == expected