PM Accept/Deny Script

By aplive on Aug 21, 2010

A simple script that pops up a dialog when someone tries to PM you.
Just paste into remotes.

on *:OPEN:?: {
  set %pmnick $nick
  dialog -m PM PM
  /msg %pmnick Please wait while I accept/deny your request to PM. This may take a few mins as I am sometimes doing other things.
  /close -m $nick
}

dialog PM {
  title "You Have A PM!"
  size -1 -1 225 50
  text "Do You Want To Accept Or Deny This PM?", 1,2 2 250 20
  button "ACCEPT", 2, 20 20 70 20
  button "DENY", 3, 120 20 70 20
}

on *:DIALOG:PM:SCLICK:2:{
  /dialog -x PM PM
  /query %pmnick PM Accepted!
}

on *:DIALOG:PM:SCLICK:3:{
  /dialog -x PM PM
  /msg %pmnick I am sorry %pmnick $+ . I have chosen to deny your PM. If you continue to try to PM me I will /ignore you. Have a nice day!
}

Comments

Sign in to comment.
[jonathan]   -  Aug 23, 2010

doesnt work at all to me :( { aputkz jinis banaiseh harunbasir polah )

 Respond  
Grant-   -  Aug 22, 2010

If you're going to use dialog -x in both if statements, why both? and if you have the target as 2,3 - you don't really need a if/if, if/else would be fine.. and you never need to use / in remotes...

on *:DIALOG:PM:SCLICK:2,3:{
  dialog -x PM PM
  if ($did == 2) {
    query %pmnick PM Accepted!
  }
  else {
    msg %pmnick I am sorry %pmnick $+ . I have chosen to deny your PM. If you continue to try to PM me I will /ignore you. Have a nice day!
    .close -m %pmnick
  }
}
 Respond  
GrimReaper   -  Aug 21, 2010

Hey Aplive, Where you have

on *:DIALOG:PM:SCLICK:2:{
  /dialog -x PM PM
  /query %pmnick PM Accepted!
}

on *:DIALOG:PM:SCLICK:3:{
  /dialog -x PM PM
  /msg %pmnick I am sorry %pmnick $+ . I have chosen to deny your PM. If you continue to try to PM me I will /ignore you. Have a nice day!
}

You could make it into one on *:DIALOG: event.

on *:DIALOG:PM:SCLICK:2,3:{
  if ($did == 2) {
    /dialog -x PM PM
    /query %pmnick PM Accepted!
  }
  if ($did == 3) {
    /dialog -x PM PM
    /msg %pmnick I am sorry %pmnick $+ . I have chosen to deny your PM. If you continue to try to PM me I will /ignore you. Have a nice day!
    .close -m %pmnick
  }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.