@require_chanmsg
@require_privilege(OP, u'You are not a channel operator.')
@commands(u'ban')
@priority(u'high')
def ban(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])
 banmask = opt
 channel = trigger.sender
 if (not opt.is_nick()):
  if (argc < 3):
   return
  channel = opt
  banmask = text[2]
 banmask = configureHostMask(banmask)
 if (banmask == u''):
  return
 bot.write([u'MODE', channel, u'+b', banmask])

@ require_chanmsg @ require_privilege ( OP , u'You are not a channel operator.' ) @ commands ( u'ban' ) @ priority ( u'high' ) def ban ( 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 ] ) banmask = opt channel = trigger . sender if ( not opt . is_nick ( ) ) : if ( argc < 3 ) : return channel = opt banmask = text [ 2 ] banmask = configureHostMask ( banmask ) if ( banmask == u'' ) : return bot . write ( [ u'MODE' , channel , u'+b' , banmask ] )
bans a twitter account from using the aoa tool .