mIRC Homepage
Posted By: da_hype $level - 17/04/04 07:33 AM
Can someone help explain this to me?

$level(address)

Finds a matching address in the remote users list and returns its corresponding levels list.

$level(*!*@mirc.com) returns =5,10,20,21,32


what does it return? does it return if someone is an IRCOP, normal user and so on?

what does level 1000, 100, 300, 1 mean?
Posted By: Fibsi Re: $level - 17/04/04 11:39 AM
type: /help Access Levels

you can add levels to an address by using the /auser or /guser command:

/auser <level> <address> [information]

example: /auser blacklist *!*spam*@* suspect!

the $ulist() identifier will lookup an address for matching Levels, most Remote events also support Levels:

on <level>:<event>: commands

example:

Code:
on [color:blue]blacklist[/color]:JOIN:#:{
 if ($me isop #) {
  mode # +b $maddress
  kick # $nick blacklisted ( $+ $ulist($maddress,blacklist,1).info $+ )
 }
}
Posted By: tidy_trax Re: $level - 17/04/04 12:03 PM
//auser x x | //echo -a $level(x)
Posted By: da_hype Re: $level - 17/04/04 12:22 PM
Any idea why this won't work then?? it's for a whois..
the if statement won't work properly..
if ($level(%user.temp) == 1000)
i keep getting $level(%user.temp) == 1 and returning "enemy"

Code:
alias -l scj if ($1 != $null) return  $+ 10 $+  $+ $1- $+  | else return 10
alias scw { if ($1 != $null) return  $+ 4 $+  $+ $1- $+  | else return 4 }
alias wlv {
  if ($1 == 800) { return Top Protection }
  elseif ($1 == 500) { return Protection }
  elseif ($1 == 400) { return Op }
  elseif ($1 == 300) { return Voice } 
  elseif ($1 == 100) { return Normal }
  elseif ($1 == 1) { return Enemy }
}



raw 311:*:{ 
  %user.temp = $2 $+ !* $+ $3 $+ @ $+ $4 
  %user.temp = $maddress(%user.temp) 
  var %a = $2 $+ !* $+ $3 $+ @ $+ $4 
  if ($level(%user.temp) == 1000) %user.temp = $scj(Yourself) 
  elseif ($level(%user.temp) &gt;= 300) { 
    %user.onick = $readini $n.prof %user.temp name 
    %user.temp =  $+ $scj $wlv($level(%user.temp)) in Channels of $+ $scj $readini $n.prof %user.temp channels 
  }
  elseif ($level(%user.temp) == 100) { %user.temp = Normal User }
  elseif ($level(%user.temp) == 1) { %user.temp = $scw(Enemy) }
  else { unset %user.temp }
  aline @O.whois $2 Nick $3 $+ @ $+ $4 
  aline @O.whois $2 Name $6- 
  aline @O.whois $2 Level %user.temp 
  if (%user.onick) aline @o.whois $2 Handle %user.onick 
  %user.temp = $wcc($3 $+ @ $+ $4)

  if (%user.temp) aline @o.whois $2 Location %user.temp
  %user.user = $2 $3 $+ @ $+ $4 
  halt

}
© mIRC Discussion Forums