; PM Script by Phil
; This code is released under the BSD license
menu channel,menubar,status {
PM
.PMs Off:/set %pmstat OFF | /echo -a 4 PM SYSTEM OFF
.PMs On:/unset %pmstat | /echo -a 12 PM SYSTEM ON
.PM Confirm Without Reason:/set %pmstat NR | /echo -a 7 PM SYSTEM SET TO CONFIRM WITHOUT REASON
.PM Confirm With Reason:/set %pmstat R | /echo -a 13 PM SYSTEM SET TO CONFIRM WITH REASON
}
on ^*:OPEN:?: {
if (%genericAway != $null) {
/query $nick 4**1 $me is currently away. Please leave a message 4**
}
else {
if (%pmstat == OFF) {
/query $nick 4**1 $me has PM system currently turned off 4**
/close -m $nick
/echo -a 9 $nick tried to PM you on $network
/halt
}
else {
.timer 1 1 .pmal $nick $network
}
}
}
alias pmal {
if (%pmstat == NR) {
/query $1 ***12Please Hold While I Accept/Reject Your PM***
/set %pmvar $input($1 wants to PM you on $2. Accept this PM?,y,PM)
if (%pmvar == $false) {
/query $1 ***4Your PM Request Has Been Rejected. You Have Been Ignored For 10 Seconds.***
/ignore $1
.timer 1 10 /ignore -r $1
/close -m $1
/halt
}
else {
/query $1 ***9Query Request Accepted***
}
}
elseif (%pmstat == R) {
/query $nick ***12Please Hold While I Accept/Reject Your PM***
/set %pmvar $input($1 wants to PM you on $2. Accept this PM?,y,PM)
if (%pmvar == $false) {
/set %reason $?="What is your reason?"
/query $1 ***4Your PM Request Has Been Rejected. You Have Been Ignored For 10 Seconds.7Reason: %reason***
/ignore $1
.timer 1 10 /ignore -r $1
/close -m $1
/halt
}
else {
/query $1 ***9Query Request Accepted***
}
}
unset %pmvar
}
on 1:INVITE:#:{
.timer 1 0 .joinal $nick $network $chan
}
alias joinal {
set %joinvar $input($1 has invited you to $3 on $2 $+ . Join this chan?,y,Invite)
if (%joinvar == $false) {
/notice $1 Your request for me to join $3 on $2 has been rejected.
}
else {
/join $3
}
}