mIRC Homepage
Posted By: Thunk Ban anyone without +ao when he kicks someone - 29/04/03 01:15 PM
Hi, I'm new to IRC scripting. I'm looking for a script that bans users who kick anyone in my channel, when they don't have +ao.

I have +ao, when i kick or ban, it should be ok.

But I give give anyone who joins my channel +o.. so if someone without +ao kicks or bans any other person, i want to ban his hostmask.

How would this be done ?
Are the ao people in your list or some bot or channel service?
quakenet, q bot
only 3 persons with +amno including me

the rest who joins get +o by a script of me
Why +o them if they are not allowed to kick?
Just use +v wink
Hi, I have been into QuakeNet scripting for a while now, so this could be of help for you.

Code:
#ban_whois off

on ^Q:NOTICE:*#*:?:{
  if ( $6 == %ban_chan ) {
    if ( *a*o* iswm $3 ) {
      set %ban_rights_ok 1
      echo $color(info2) -s User is allowed to ban on %ban_chan
    }
  }
  haltdef
}

on ^Q:NOTICE:End of list.:?:{
  if ( %ban_rights_ok != 1 ) {
    echo $color(info) -s User is NOT allowed to ban on %ban_chan $+ , performing countermeasures
    msg Q chanlev %ban_nick %ban_chan -amnotv+b
    ban -u10 %ban_chan $mask( $address( %ban_nick, 5), 3 )
    kick %ban_chan %ban_nick
  }
  unset %ban_rights_ok
  unset %ban_bot
  unset %ban_chan
  unset %ban_nick
  .disable #ban_whois
  haltdef
}

on ^Q:NOTICE:*:?:{
  haltdef
}

on ^L:NOTICE:*#*:?:{
  if ( $1 == %ban_chan ) {
    if ( *a*o* iswm $2 ) {
      set %ban_rights_ok 1
      echo $color(info2) -s User is allowed to ban on %ban_chan
    }
  }
  haltdef
}

on ^L:NOTICE:End of list.:?:{
  if ( %ban_rights_ok != 1 ) {
    echo $color(info) -s User is NOT allowed to ban on %ban_chan $+ , performing countermeasures
    msg L chanlev %ban_nick %ban_chan -agmnov
    ban -u10 %ban_chan $mask( $address( %ban_nick, 5), 3 )
    kick %ban_chan %ban_nick
  }
  unset %ban_rights_ok
  unset %ban_bot
  unset %ban_chan
  unset %ban_nick
  .disable #ban_whois
  haltdef
}

on ^L:NOTICE:*:?:{
  haltdef
}

#ban_whois end

on *:BAN:#hatch:{
  if ( Q ison $chan ) set %ban_bot Q@CServe.quakenet.org
  elseif ( L ison $chan ) set %ban_bot L@Lightweight.quakenet.org
  else {
    echo $color(info)) -s Servicebot is not on $chan
    halt
  }
  set %ban_nick $nick
  set %ban_chan $chan
  .enable #ban_whois
  .msg %ban_bot whois $nick
}


This script works for Q/L controlled channels. It works like this:
If anyone bans someone on a channel, the script asks Q/L for the chanlev of this user.
It waits for Q/L's answer and tries to find +ao flags in the response for the specific channel. If there is nothing found, the script kickbans the user and also removes any flags from the Q/L userlist in that channel (and sets +b on Q channels).
You can easily find these commands and change them to whatever you want.
Hope that helped, but know that the best way to prevent problems in your channel is, to keep the number of ops low and to give op only to trustful people!

hf,
--hatch
© mIRC Discussion Forums