mIRC Homepage
Posted By: TECO $input cannot open - 31/10/18 04:08 PM
Hi,
I try to use $input but it always gives me an error that if I can not use it.

Code:
on *:notice:*Este nick está registado e protegido*:*:{
  if ($nick == NickServ) {
    if (%password) {
      .autojoin -s
      nickserv identify $decode(%password)
    }
    else {
      var %password = $input(Enter the password:,ep,NickServ)
      set %password $encode(%password)
    }
  }
}


Code:
* $input: cannot use in an event (line 8, script3.ini)

Does anyone have a solution?
Thank you!
Posted By: maroon Re: $input cannot open - 31/10/18 04:24 PM
You can use "timer 1 0 command", which does it outside the command, after zero ms delay. If you needed $nick you'd need to pass that as a parameter.

The default for $encode/$decode is switch u UUencode, but that includes commas and dollars. You should change both (%password) to (%password,m) to use base64 (or switch a for base32).
Or use $unsafe to prevent it being evaluated.
Posted By: TECO Re: $input cannot open - 31/10/18 05:05 PM
Originally Posted By: maroon
You can use "timer 1 0 command", which does it outside the command, after zero ms delay. If you needed $nick you'd need to pass that as a parameter.

The default for $encode/$decode is switch u UUencode, but that includes commas and dollars. You should change both (%password) to (%password,m) to use base64 (or switch a for base32).
Or use $unsafe to prevent it being evaluated.


Thank you!
© mIRC Discussion Forums