Пример #1
0
 def leftChannel(self, channel):
     c = str(channel)
     try:
         helpers.part(self.cli, c)
         self.cli.command_handler.joined = False
     except socket.error:
         self.setConnectionBroken()
Пример #2
0
 def leftChannel(self, channel):
     c = str(channel)
     try:
         helpers.part(self.cli, c)
         self.cli.command_handler.joined = False
     except socket.error:
         self.setConnectionBroken()
Пример #3
0
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))
Пример #4
0
 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
Пример #5
0
    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)
Пример #6
0
 def part(self, channel):
     helpers.part(self.client, channel)
Пример #7
0
 def part(self, channel):
     helpers.part(self.client, channel)
Пример #8
0
 def leftChannel(self, channel):
     c = unicode(channel)
     try:
         helpers.part(self.cli, c)
     except socket.error:
         self.setConnectionBroken()
Пример #9
0
 def part(self, sender, dest, arg):
     log.info('told to join %s by %s' % (arg, sender))
     helpers.part(self.client, arg.strip())