Query Script

By PwnerJohn on Jul 12, 2009

Requested by CadetAndrew - it will accept, deny, or block the user for 1m. Query :D

on ^1:OPEN:?:*: { if (!%flood.o) set %query.nick $nick | set %query.msg $1- | msg $nick Please wait while I choose to accept or deny this query | dialog -m test test | set -u5 %flood.o }

dialog test {

  title "Simple Query Script"
  size 250 250 250 250

  text You have a query from %query.nick saying %query.msg ,1, 5 5 100 25
  button "Accept",2, 5 200 50 30, ok
  button "Deny",3, 60 200 50 30, cancel
  button "Block",4, 115 200 50 30

}

on *:dialog:test:sclick:2: { msg %query.nick :D I have accepted your query. | unset %query.nick | unset %query.msg }
on *:dialog:test:sclick:3: { msg %query.nick :( I have denied your query - please try again later. | close -m %query.nick | unset %query.nick | unset %query.msg }
on *:dialog:test:sclick:4: { dialog -x test | msg %query.nick Alright, you have annoyed me, you will be ignored for 1 minute. | ignore -u60 %query.nick 2 | unset %query.nick | unset %query.msg }

Comments

Sign in to comment.
PwnerJohn   -  Jul 13, 2009

Done...?

 Respond  
sk68   -  Jul 13, 2009

not a huge deal but you might want to change the 1's on the dialog events to wildcards(*) as some people(like me) use custom levels which might interfere with the script, not likely but possible

 Respond  
WorldDMT   -  Jul 13, 2009

text "You have a query from %query.nick saying %query.msg $+ ",1, 5 5 100 25

dont need $+ and ""

text You have a query from %query.nick saying %query.msg ,1, 5 5 100 25

u have to put a condition before dialog -m test test

 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.