mIRC Home    About    Download    Register    News    Help

Print Thread
#264125 31/10/18 04:08 PM
Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
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!


TECO
irc.PTirc.org (Co-Admin)
TECO #264126 31/10/18 04:24 PM
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Jul 2014
Posts: 308
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 308
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!

Last edited by Tiago; 31/10/18 06:58 PM.

TECO
irc.PTirc.org (Co-Admin)

Link Copied to Clipboard