def leftChannel(self, channel): c = str(channel) try: helpers.part(self.cli, c) self.cli.command_handler.joined = False except socket.error: self.setConnectionBroken()
def part(self,nick,chan,msg): if authed(self,nick,chan): if msg in CHANS: CHANS.remove(msg) config.set('IRC','channels',','.join(CHANS)) helpers.part(cli, msg) helpers.msg(self.client,chan,'%s: OK, I parted %s'%(nick,msg)) else: helpers.msg(self.client,chan,'%s: Um...I am not in %s...'%(nick,msg))
def handle(self, message): if re.match("(#|!)\w+", message.params): # Part the given channel channel_to_part = message.params elif not message.params and not message.is_private_message: # Part this channel channel_to_part = message.source else: self.replytoinvalidparams(message) return helpers.part(message.client, channel_to_part) #@UndefinedVariable IGNORE:E1101
def _cmd_PART(self, nick, mask, chan, arg): """ADMIN: part [<channel>] - Make the bot leave the specified channel, or if not specified, the channel the message was in.""" usage = lambda: self._msg(chan, "%s: Usage: part [<channel>]" % nick) if not arg: if chan.startswith('#'): arg = chan else: return usage() self._msg(chan, "%s: Leaving channel %s." % (nick, arg)) helpers.part(self.client, arg)
def part(self, channel): helpers.part(self.client, channel)
def leftChannel(self, channel): c = unicode(channel) try: helpers.part(self.cli, c) except socket.error: self.setConnectionBroken()
def part(self, sender, dest, arg): log.info('told to join %s by %s' % (arg, sender)) helpers.part(self.client, arg.strip())