All pastes #809811 Raw Edit

Invite System

public text v1 · immutable
·published 2007-12-09 07:57 UTC
rendered paste body
ON *:INVITE:#:{
  if ($left($me,1) == [) { notice $nick $c2([Invite System]) $c1(Please Invite The Main Bot!) | halt }
  if (!$readini(BotData.ini,Kicks,$chan)) { writeini -n BotData.ini Kicks $chan 0 }
  var %a $r(1,2)
  if (%a = 1) { JOIN $chan }
  if (%a = 2) { notice [RS]LunarScript JOIN # }
  if ($readini(BotData.ini,BlackList,$chan)) {
    .timer.BlackList. $+ $chan 1 2 PART $chan $c1(Your Channel Has Been BlackListed For The Following Reasons:) $c2($v1) $+ $c1(.)
  }
}
ON *:NOTICE:JOIN*:*:{ if ($nick == LunarScript) && ($1 == JOIN) { JOIN $2 } }
ON *:JOIN:#:{
  if ($nick == $me) && (# != #msl) {
    .timer.join. $+ $chan 1 1 MSG $chan $c1(Hi! I am) $c2($me) $+ $c1(, the General IRC Bot!! * $&
      If you do not want me here, type) $c2($qt(!part $me)) $c1(to remove me.) $&
      $c1(I was kicked from $chan) $c2($iif($readini(BotData.ini,Kicks,$chan),$v1,0) $+ /5) $c1(times.)) $&
    .timer.JoinC. $+ $chan 1 2 CheckBots $chan
  }
}
alias CheckBots {
  ;###################################
  ;##        Exception List         ##
  ;##                               ##
  var %botchan #Ls #botchan #botz #bot #bothelp #botcentral
  ;###################################
  if ($findtok(%botchan,$1,32)) { halt }
  ;###################################
  ;##          Own Bot List         ##
  ;##                               ##
  var %BotList LunarScript [Rs]LunarScript
  ;###################################
  var %a 1
  %BotList = $remtok(%BotList,$me,32)
  while ($nick($1,%a)) {
    if ($findtok(%BotList,$nick($1,%a),32)) {
      PART $1 $c1(Only 1 Bot Per Channel!) $c2($nick($1,%a)) $c1(Found!)
      goto end
    }
    inc %a
  }