I’m new to mIRC script programming.
I’m programing a mIRC sript which open a windows every time a user (nick) open a private chat with my user(nick), I would like to have in this window the oportunity of rejecting the private, I’ve writen the next script in the remote script editor tab (I don’t know if that is correct).
The question is that the next script doesn’t run correcting not opening any windows giving me the posibility of rejecting the private of a remote user.
the scritpt is:
/log on
; Define the on open event
on *:OPEN:?:*:{
; Get the nickname of the user who opened the private chat
var %nick = $nick
; Display a pop-up message asking if you want to accept the private chat request
msgbox -yn "Private Chat Request" $+($crlf, $crlf, Tienes una solicitud de privado de $nick. $+($crlf, Quieres aceptarlo?)
if ($msgbox == 2) {
; If "No" is clicked, close the private chat
/close -m $nick
; Notify the user that the private chat request has been rejected
msg $nick Lo siento, tu privado ha sido rechazado.
}
}