Exemple #1
0
 def list(self, channels=None, server=""):
     """Send a LIST command."""
     command = "LIST"
     channels = ",".join(always_iterable(channels))
     if channels:
         command += ' ' + channels
     if server:
         command = command + " " + server
     self.send_raw(command)
Exemple #2
0
 def part(self, channels, message=""):
     """Send a PART command."""
     channels = always_iterable(channels)
     cmd_parts = [
         'PART',
         ','.join(channels),
     ]
     if message: cmd_parts.append(message)
     else: cmd_parts.append(config['VERSION'])
     self.send_raw(' '.join(cmd_parts))
Exemple #3
0
 def whois(self, targets):
     """Send a WHOIS command."""
     self.send_raw("WHOIS " + ",".join(always_iterable(targets)))
Exemple #4
0
 def names(self, channels=None):
     """Send a NAMES command."""
     tmpl = "NAMES {channels}" if channels else "NAMES"
     channels = ','.join(always_iterable(channels))
     self.send_raw(tmpl.format(channels=channels))