dialog PMSystem { title "PM System v1.0" size -1 -1 152 34 option dbu list 1, 2 4 66 28, size vsbar button "Accept", 2, 71 4 37 12 button "Decline", 3, 112 4 37 12 button "Auto Accept", 4, 71 20 37 12 button "Auto Decline", 5, 112 20 37 12 } Menu Channel { PM System:/Dialog -m PMSystem PMSystem } On *:CLOSE:?:{ Msg $Target 14[7PM System v0.114] Your PM has been declined. DelNick $Target } On *:OPEN:?:{ If ($Read(AutoAccept.txt, w, $Address($Nick,2))) { Msg $Nick 14[7PM System v0.114] Your PM has been accepted. } ElseIf ($Read(AutoDecline.txt, w, $Address($Nick,2))) { Msg $Nick 14[7PM System v0.114] Your PM has been declined. } Else { Var %Time = $Asctime(hh:nn:ss) Did -a PMSystem 1 $Nick %Time .Timer $+ $Nick 1 5 /Close -m $Nick .Timer $+ $Nick 1 5 /Msg $Nick 14[7PM System v0.114] Your PM has timed out. .Timer $+ $Nick 1 5 /DelNick $Nick } } Alias DelNick { Var %x = 1, %y = $did(PmSystem,1).lines While (%x <= %y) { If ($1 == $Gettok($Did(PMSystem,1,%x).text,1,32)) { Did -d PMSystem 1 %x } Inc %x } } On *:DIALOG:PMSystem:Sclick:2:{ Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] Your PM has been accepted. Did -d PMSystem 1 $did(PMSystem,1,1).sel } On *:DIALOG:PMSystem:Sclick:3:{ Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] Your PM has been declined. Close -m $Gettok($Did(1).seltext,1,32) Did -d PMSystem 1 $did(PMSystem,1,1).sel } On *:DIALOG:PMSystem:Sclick:5:{ Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] Your PM has been accepted. Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] You have been added to my auto-accept list. Write AutoAccept.txt $Address($Gettok($Did(1).seltext,1,32),2) Did -d PMSystem 1 $did(PMSystem,1,1).sel } On *:DIALOG:PMSystem:Sclick:4:{ Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] Your PM has been declined. Msg $Gettok($Did(1).seltext,1,32) 14[7PM System v0.114] You have been added to my auto-decline list. Write AutoDecline.txt $Address($Gettok($Did(1).seltext,1,32),2) Did -d PMSystem 1 $did(PMSystem,1,1).sel }