All pastes #413107 Raw Edit

Untitled

public text v1 · immutable
#413107 ·published 2007-03-28 03:28 UTC
rendered paste body
;;;;;Goes in FusionBOT!
ctcp *:*:*:{
  if ($1 == PART) writeini info.ini available $nick $calc($readini(info.ini,available,$nick))
  if ($1 == KICKED) {
    writeini info.ini kicks $2 $calc($readini(info.ini,kicks,$2) - 1)
    writeini info.ini available $nick $calc($readini(info.ini,available,$nick) - 1)
  }
}
on *:TEXT:*:#fusionbot-admins:{
  if ($nick !isop $chan) halt
  if ($1 == ~chanban) {
    if ($readini(info.ini,cbans,$2)) notice $nick you cannot do dat sht coz that chann0w is alrdy on da ban ya...
    else { writeini info.ini cbans $2 banned | msg $chan $2 jus got owned!! BANNED BCHS }
  }
  if ($1 == ~remchanban) {
    if ($readini(info.ini,cbans,$2)) { remini info.ini cbans $2 | msg $chan $2 has been removerd from da list }
    else notice $nick you cannot do dat sht bch!
  }
  if ($1 == ~addexcept) {
    if ($readini(info.ini,cbans,$2)) notice $nick that channel is already banned from our services, please ~remchanban to add that channel to the excepted list..
    else {
      if ($readini(info.ini,excepts,$2)) notice $nick that channel is already on the excepted list.
      else { writeini info.ini excepts $2 excepted | msg $chan $2 has been added to the excepted list! }
    }
  }
  if ($1 == ~remexcept) {
    if ($readini(info.ini,excepts,$2)) { remini info.ini excepts $2 | msg $chan that channel is now removed from the excepted list. }
    else { notice $nick $2 is not on the excepted list! }
  }
  if ($1 == ~setkicks) { writeini info.ini kicks $2 $3 | msg $chan $2 $+ 's amount of kicks has been (down|up)graded to: $3 kicks }
}
on *:INVITE:#:{
  if ($readini(info.ini,cbans,$chan)) halt
  else {
    var %a = 0, %x = 10000
    while (%a < $ini(info.ini,available,0)) {
      var %a = %a + 1
      var %bot = $chr(91) $+ $gettok($ini(info.ini,available,%a),1,126) $+ $chr(93) $+ $gettok($ini(info.ini,available,%a),2,126)
      var %cbot = $iif(%x > $readini(info.ini,available,%bot),%bot,%cbot)
      var %x = $iif($readini(info.ini,available,%bot) < %x,$v1,$v2)
      echo -a a = %a bot = %bot x = %x cbot = %cbot
    }
    if (%x >= 30) { notice $nick sorry, we're too full | halt }
    if (!$readini(info.ini,kicks,$chan)) writeini info.ini kicks $chan 5
    ctcp %cbot JOIN $chan $readini(info.ini,kicks,$chan)
    writeini info.ini available %cbot $calc($readini(info.ini,available,%cbot) + 1)
  }
}
;;;;;Goes in All The Other BOTS!
ctcp *:*:*:{
  if ($1 == JOIN) {
    join $2
    msg $2 only $3 kicks away from being blacklisted.
  }
}
on *:TEXT:!part *:#:{
  if ($2 == $me) {
    part $chan cya later
    ctcp FusionBot PART $chan
  }
}
on *:KICK:#:{
  if ($knick == $me) ctcp FusionBot KICK $chan
}