on *:open:?:/window -h $nick | .msg $nick $talker1(Please wait for my verification of the PM...) | if ($dialog(Query) != $null) { did -a Query 4 $nick } | else { dialog -dm Query Query | did -a Query 4 $nick }
dialog Query {
size -1 -1 127 108
title "PM Blocker"
button "Accept",1,8 77 52 24
button "Decline",2,65 77 52 24
box "Nicks",3,6 2 118 71
list 4,10 16 105 51,hsbar size sort
}
on *:dialog:QUERY:init:*:{
mdx SetMircVersion $version
mdx MarkDialog $dname
mdx SetDialog $dname bgcolor $rgb(0,0,0)
mdx SetColor $dname 3,4 background $rgb(0,0,0)
mdx SetColor $dname 3,4 textbg $rgb(0,0,0)
mdx SetColor $dname 3,4 text $rgb(255,255,255)
}
on *:dialog:Query:sclick:*:{ if ($did == 2) { if ($didwm(Query,4,$did(Query,4).seltext) != $null) { window -c $did(Query,4).seltext | .msg $did(Query,4).seltext $talker1($me has declined your query...) | did -d Query 4 $didwm(Query,4,$did(Query,4).seltext) } }
if ($did == 1) { if ($didwm(Query,4,$did(Query,4).seltext) != $null) { window -rw $did(Query,4).seltext | .msg $did(Query,4).seltext $talker1($me has accepted your query...) | did -d Query 4 $didwm(Query,4,$did(Query,4).seltext) } }
}
:: The Code Works, But Say Im on 2 servers (I usually am) andddd:
We're call Server #1 A and #2 B.
So Im on Server A and I type "/dialog -dm Query Query" and it opens... Say I get a PM from Server A It'll show the nick and I can click accept/decline - it'll work.
But, If I was on Server A and I opened the dialog on Server A and got a PM From Server B, It'd try to Open the Window on "Server A" and it'd get a error: /Windows something something because Its not the right server... How can I fix this?