I want to get a random passcode every 10 minutes - 12 characters (see example)
this doesn't sound too hard, mind you, you'd probably want to add this to a hash table, but I am going to use variables for simplicities sake.
alias /auth.code timer -o 0 600 password.change
alias -l password.change {
var %text
var %i 1
var %length 12
while ( %i <= %length ) {
%text = %text $+ $chr( $rand(48,122) )
inc %i 1
}
set %authcode %text
}
on *:text:!authcode*:?:{
if ( $2- == %authcode ) {
msg $nick You may proceed
<enter whatever game interface you have here>
}
else { msg $nick Passcode incorrect, please try again. }
}
that would include the printable -[],./s the the code,
in a private message, this command works as follows:
<CakerX> !authcode H6f8e4A5d2P7
<bot> You may proceed
incorrect passcode
<bot> Passcode incorrect, please try again