I couldn't get the dialog working like ik wanted so i had a look at $input.
I found a small snippet for query but that had only "yes" and "no" on the query request.
The only info was the time of the request and the name who requested the query with you.
Credit to xelent who made this.
I added a spam filter, a away message, comchans and message of what is being said at the request.
Any comment of what is wrong or can be better is welcome.
Here is what i made of it:
on *:OPEN:?: { if ($away) { notice $nick Sorry, but $me is away. | close -m $nick }
elseif (porn isin $strip($1-) || http:// isin $strip($1-) || www isin $strip($1-) || $chr(35) isin $1-) { .msg $nick Go spam somewhere else ..... you r ignored. | .ignore -p $nick | close -m $nick }
else {
.msg $nick Query Blocker - Please Be Patient untill i accept or decline
set %querytext. [ $+ [ $nick ] ] $1-
var %x 0
var %y $comchan($nick,0)
while (%x < %y) {
inc %x
var %a %a $+ $chr(32) $+ $comchan($nick,%x)
}
.timer 1 0 acceptq $timestamp $nick $date %a %querytext. [ $+ [ $nick ] ]
}
}
alias acceptq {
var %sp = $crlf $+ $crlf
set %acc $input( $3 $1 $+ %sp $+ Comschan: $4 $+ %sp $+ Message: $5- ,yqdv,Accept Query from $+($2,?))
acceptqcheck $1 $2
}
alias acceptqcheck {
if ( %acc == $yes ) {
.msg $2 Request Accepted
window -a $2
}
if ( %acc == $no ) {
.msg $2 Request Declined
.ignore -p $2
window -c $2
}
unset %acc
unset %querytext. [ $+ [ $nick ] ]
}