@require_chanmsg
@require_privilege(OP, u'You are not a channel operator.')
@commands(u'kickban', u'kb')
@priority(u'high')
def kickban(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 < 4):
  return
 opt = Identifier(text[1])
 nick = opt
 mask = text[2]
 channel = trigger.sender
 reasonidx = 3
 if (not opt.is_nick()):
  if (argc < 5):
   return
  channel = opt
  nick = text[2]
  mask = text[3]
  reasonidx = 4
 reason = u' '.join(text[reasonidx:])
 mask = configureHostMask(mask)
 if (mask == u''):
  return
 bot.write([u'MODE', channel, u'+b', mask])
 bot.write([u'KICK', channel, nick], reason)

@ require_chanmsg @ require_privilege ( OP , u'You are not a channel operator.' ) @ commands ( u'kickban' , u'kb' ) @ priority ( u'high' ) def kickban ( 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 < 4 ) : return opt = Identifier ( text [ 1 ] ) nick = opt mask = text [ 2 ] channel = trigger . sender reasonidx = 3 if ( not opt . is_nick ( ) ) : if ( argc < 5 ) : return channel = opt nick = text [ 2 ] mask = text [ 3 ] reasonidx = 4 reason = u' ' . join ( text [ reasonidx : ] ) mask = configureHostMask ( mask ) if ( mask == u'' ) : return bot . write ( [ u'MODE' , channel , u'+b' , mask ] ) bot . write ( [ u'KICK' , channel , nick ] , reason )
this gives admins the ability to kickban a user .