mIRC Home    About    Download    Register    News    Help

Print Thread
#65490 27/12/03 12:49 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
How to make the %'s work? Or, how to write them right. smirk

Code:
on 1:text:.login*:?:{
  if ([color:red]% $+ $nick $+ .username[/color] == $2) && ([color:red]% $+ $nick $+ .password[/color] == $3) {
    .notice $nick AUTHENTICATION SUCCESSFUL as [color:red]% $+ $2 $+ .username[/color]
    .auser [color:red]% $+ $nick $+ .level[/color] $address($nick,3)
  }
  else { .notice $nick AUTHENTICATION FAILED as $2 }
}

#65491 27/12/03 12:56 AM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
Try:
$eval($+(%,$nick,.username),1) ;to return the variable, eg: %Seifer.username
$eval($+(%,$nick,.username),2) ;to return the value of the variable


#65492 27/12/03 12:58 AM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
You might want to set the viriables. After you logon. for each new nick.

on 1:text:.login*:?:{
if ($+(%,$nick,.username) == $2) && ($+(%,$nick,.password) == $3) {
.notice $nick AUTHENTICATION SUCCESSFUL as $+(%,$2,.username)
.auser % $+ $nick $+ .level $address($nick,3)
}
else {
.notice $nick AUTHENTICATION FAILED as $2
set $+(%,$nick,.username) $nick
set $+(%,$nick, password) $$?="Enter Password For this $nick"
}
}




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#65493 27/12/03 01:04 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
thanks.. wink

#65494 27/12/03 01:38 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Now i made the login system better.. wink - just want to share it..

Code:
on 1:text:login*:?:{
  if ($readini(auth.ini, $2, pass) == $encode($3)) {
    .notice $nick AUTHENTICATION SUCCESSFUL as $readini(auth.ini, $2, user)
    auser $readini(auth.ini, $2, level) $address($nick,1)
    writeini auth.ini $readini(auth.ini, $2, user) address $address($nick,1)
    writeini auth.ini $readini(auth.ini, $2, user) time $fulldate
  }
  else { .notice $nick AUTHENTICATION FAILED }
}

#65495 27/12/03 03:04 AM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
it don't reply any thing..

/test deep3d

i have:
[deep3d]
user=deep3d
in the ini

Code:
 test {
  if $readini(auth.ini, $1, user) == $1 {
    echo -a Username is taken
  }
} 


Link Copied to Clipboard