@require_chanmsg
@require_privilege(OP, u'You are not a channel operator.')
@commands(u'kick')
@priority(u'high')
def kick(bot, trigger):
 if (bot.privileges[trigger.sender][bot.nick] < HALFOP):
  return bot.reply(u"I'm not a channel operator!")
 text = trigger.group().split()
 argc = len(text)
 if (argc < 2):
  return
 opt = Identifier(text[1])
 nick = opt
 channel = trigger.sender
 reasonidx = 2
 if (not opt.is_nick()):
  if (argc < 3):
   return
  nick = text[2]
  channel = opt
  reasonidx = 3
 reason = u' '.join(text[reasonidx:])
 if (nick != bot.config.core.nick):
  bot.write([u'KICK', channel, nick], reason)

@ require_chanmsg @ require_privilege ( OP , u'You are not a channel operator.' ) @ commands ( u'kick' ) @ priority ( u'high' ) def kick ( bot , trigger ) : if ( bot . privileges [ trigger . sender ] [ bot . nick ] < HALFOP ) : return bot . reply ( u"I'm not a channel operator!" ) text = trigger . group ( ) . split ( ) argc = len ( text ) if ( argc < 2 ) : return opt = Identifier ( text [ 1 ] ) nick = opt channel = trigger . sender reasonidx = 2 if ( not opt . is_nick ( ) ) : if ( argc < 3 ) : return nick = text [ 2 ] channel = opt reasonidx = 3 reason = u' ' . join ( text [ reasonidx : ] ) if ( nick != bot . config . core . nick ) : bot . write ( [ u'KICK' , channel , nick ] , reason )
kick a user from the channel .