29 March 2012

war script

On *:kick:#: { skick }
On *:op:#: { sop }
on +10:join:#: { raw -q kick %chan $nick : $+ 4 | halt }
On *+*:join:#: { sjoin | ssjoin }
on *:signal:xkill: {
raw -q kick %chan %nick : $+ 4
}
on *:signal:*:{
if ($signal == superkick1) { raw -q kick %chan %nick : $+ 4 }
if ($signal == superkick2) { .scon -a raw -q kick %chan %nick : $+ 4 }
if ($signal == superkick3) { raw -q kick %chan %nick : $+ 4 }
if ($signal == superkick4) { .scon -a raw -q kick %chan %nick : $+ 4 }
}
alias ssjoin {
if ($event == join) {
raw -q kick %chan %nick : $+ 4
if ($nick == %nick) {
signal -n xkill
}
}
}
alias -l wirc {
.set %timer $r(1,5)
timerW 1 %timer join %chan
}
alias -l sskick { if ($istok($nick,$me,C) == $true) && ($event == kick) { signal -n superkick1 | halt } }
alias -l skick { if ($istok($knick,$me,C) == $true) && ($event == kick) { .set %chan # | .set %nick $nick | .auser 10 $nick | $wirc } }
alias -l sop { if ($istok($opnick,$me,C) == $true) && (%nick isop #) && ($event == op) { super | .timerF off } }
alias -l sjoin { if ($istok($nick,%nick,C) == $true) && ($event == join) { signal -n superkick3 } }
alias -l super { signal -n superkick4 }
on *1:RAWMODE:#:{
if ($regex($1,[vhoaq])) && ($istokcs($2-,$me,32)) {
var %modechrpos 1
var %modenick 1
while (%modechrpos <= $len($1)) {
set %modechr $mid($1,%modechrpos,1)
if (%modechr == +) { var %mode+ $true }
if (%modechr == -) { unset %mode+ }
if ($regex(%modechr,[vhoaq])) {
if ($gettok($2-,%modenick,32) === $me) {
if (%mode+ == $true) {
if (%modechr isin %statuslost) { var %statuslost $remtok(%statuslost,%modechr,32) }
else { var %statusgained %statusgained %modechr }
}
else {
if (%modechr isin %statusgained) { var %statusgained $remtok(%statusgained,%modechr,32) }
else { var %statuslost %statuslost %modechr }
}
}
inc %modenick
}
inc %modechrpos
}
if (o isin %statusgained) {
if (%nick ison $chan) {
raw -q kick $chan %nick : $+ 4
}
}
unset %modechr
}
}

No comments: