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 } 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 *:CLOSE:?:{ Var %x = 1 While (%x <= %y) { If ($Target == $Gettok($Did(PMSystem,1,%x).text,1,32)) { Msg $Target 14[7PM System v0.114] Your PM has been declined. DelNick $Target } Inc %x } } 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 500 .Msg $Nick 14[7PM System v0.114] Your PM has timed out after 5 minutes and has been auto-declined. .Timer $+ $Nick 1 500 .Close -m $Nick .Timer $+ $Nick 1 500 .DelNick $Nick } } On *:DIALOG:PMSystem:Sclick:2:{ If ($Gettok($Did(1).seltext,1,32)) { 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:{ If ($Gettok($Did(1).seltext,1,32)) { .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:{ If ($Gettok($Did(1).seltext,1,32)) { .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:{ If ($Gettok($Did(1).seltext,1,32)) { .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 } }