mIRC Homepage
Posted By: ATMA dynamic vars - 20/04/03 07:42 PM
ok i have my vars set up in a strange way for my oper mod
like this -
%operline.password.1 pass1
%operline.password.2 pass2
%operline.password.3 pass3

what i want is a small if line that look at the # at the end of the line %operline.password."1 - 30" i dont know how to do this

sorry tryed to make this as clear as i could
Posted By: laz Re: dynamic vars - 20/04/03 07:48 PM
Hmm I'm not sure if this is what you want:

[code]
var %i = 1
while (%operline.password $+ %i) {
echo $ifmatch
}
Posted By: gerdigos Re: dynamic vars - 20/04/03 08:13 PM
Hm, it seems easy but it's tricky. Try this one:
Code:
 
if (%operline.password.*) { 
echo -a Operline password is $gettok(%operline.password.*,2,46)

Hope I helped and hope it works!
Cheers! smile
Posted By: theRat Re: dynamic vars - 20/04/03 10:39 PM
Code:
var %i = 1
while ( $eval( $+(%,operline.password,%i) ,2 ) ) {
   echo $ifmatch
   inc %i
}  
  
Posted By: Nimue Re: dynamic vars - 20/04/03 11:11 PM
Code:
alias passwds {
  var %i = 1
  while $var(%operline.password.*,%i) {
    echo -a $ifmatch $eval($ifmatch,2)
    inc %i
  }
}
Posted By: ATMA Re: dynamic vars - 20/04/03 11:45 PM
ok idk how i would want to set this in here is the code i have right now

i need to fill in the on connect so when i log on it /oper <handle> <password>
Code:
on *:DIALOG:addoperline:sclick:11: {
  if ($did(addoperline,3) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(addoperline,5) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(addoperline,7) == $null) { .echo *****ERROR DO IT AGIAN }
  if ($did(addoperline,9) == $null) { .echo *****ERROR DO IT AGIAN }
  else {
    .set %operline.handel. $+ %op# $did(addoperline,3)
    .set %operline.password. $+ %op# $encode($did(addoperline,5))
    .set %operline.server. $+ %op# $did(addoperline,7)
    .set %operline.name. $+ %op# $did(addoperline,9)
    if (%op# &gt;= 30) { .echo you have reached your max del some then do it again. }
    else { .inc %op# 1 }
  }
}
on *:DIALOG:opers:sclick:37: { .dialog -md addoperline addoperline }

on *:CONNECT: {
  if ($server ==  %operline.server."THE #") { "commands" }
}
Posted By: Nimue Re: dynamic vars - 21/04/03 03:44 PM
Code:
on *:CONNECT:{
  var %i = 1
  while $var(%operline.server.*,%i) {
    if $eval($ifmatch,2) == $server {
      var %a = $gettok($var(%operline.server.*,%i),3,46)
      oper $eval($+(%,operline.handel.,%a),2) $decode($eval($+(%,operline.password.,%a),2))
      break
    }
    inc %i
  }
}
© mIRC Discussion Forums