Another basic script, this time a Query Blocker. One extra key feature is that if you flood the person using this system, it ignores them for 10 seconds.
on *:START: {
set %xc.version v1.0
set %XCeptPmBlockv1.0 on
XPB
}
on *:UNLOAD: { unload.cmds }
on *:EXIT: { unload.cmds }
alias -l unload.cmds {
var %i 1
While ($query(%i)) {
.timerexpire $+ $query(%i) off
inc %i
}
echo -a 3,1.9:15XCept Query Blocker %xc.version
echo -a 3,1.9:15Have a nice day!
unset %xc.version %XCeptPmBlockv1.0 %i
}
alias XPB {
echo -a $chr(31)
echo -a 3,1.9:15XCept Query Blocker %xc.version
echo -a 3,1.9:15When queried, type "accept" or "decline"
echo -a 3,1.9:15in the window of the person sending you the query
echo -a 3,1.9:15If you are flooded by the person, it will ignore them for 10 seconds
echo -a 3,1.9:15You can Enable/Disable this script by right clicking in any channel
echo -a 3,1.9:15Type /XPB to see this again
echo -a 3,1.9:15XCept Query Blocker %xc.version
echo -a $chr(31)
}
menu channel {
$iif(%XCeptPmBlockv1.0 = on,$style(1)) $+ XCept Query Blocker %xc.version://if (%XCeptPmBlockv1.0 = on) { .timer 1 .1 /set %XCeptPmBlockv1.0 off | .disable #XCeptPmBlockv1.0 } | //if (%XCeptPmBlockv1.0 = off) { .timer 1 .1 /set %XCeptPmBlockv1.0 on | .enable #XCeptPmBlockv1.0 }
}
#XCeptPmBlockv1.0 off
on *:OPEN:?:*: {
msg $nick $ltheme Please wait will I choose to Accept/Decline your Query $+ $rtheme
set -z %PMFld. [ $+ [ $nick ] ] 2
echo -a $ltheme $nick is sending you a Private Message $+ $rtheme
.timerexpire $+ $nick 1 60 /expire $nick
}
on *:TEXT:*:?: {
If (%PMFld. [ $+ [ $nick ] ] >= 5) {
msg $nick $ltheme Added to ignore list for 10 seconds $+ $rtheme
.ignore -pu10 $address($nick,4)
.window -c $nick
}
If (%PMFld. [ $+ [ $nick ] ] < 5) { inc %PMfld. [ $+ [ $nick ] ] 1 }
}
alias expire {
If ($query($1)) {
msg $1 $ltheme I'm sorry, I did not get to your Query in time. Auto-Declined $+ $rtheme
.window -c $1
}
}
alias -l decline {
If ($query($1)) {
msg $1 $ltheme Your Query has been Declined $+ $rtheme
.window -c $1
.timerexpire $+ $1 off
}
}
alias -l accept {
If ($query($1)) {
msg $1 $ltheme Your Query has been Accepted $+ $rtheme
.timerexpire $+ $1 off
}
}
on *:INPUT:?: {
If ($query($active)) && (!$ctrlenter) {
If (!$2) {
If ($1 = accept) || ($1 = decline) {
haltdef
$1 $active
}
}
}
}
#XCeptPmBlockv1.0 end
alias -l ltheme { return 3,1.9:14XCept Query Blocker %xc.version $+ .15 }
alias -l rtheme { return 9:3. }