Difference between revisions of "$ial"

From Scriptwiki
Jump to: navigation, search
m (tweaked)
Line 10: Line 10:
 
This example echos the total number of addresses in your IAL.
 
This example echos the total number of addresses in your IAL.
 
  echo -a $ial(*Dana@staff.quakenet.org,1).nick
 
  echo -a $ial(*Dana@staff.quakenet.org,1).nick
This one would echo ''Dana'', as it's the first and probably one matching nick.
+
This one would echo ''Dana'', as it's the first and probably only matching nick.
 
  [[ialmark]] Dana This is Dana!
 
  [[ialmark]] Dana This is Dana!
 
  echo -a $ial(Dana).mark
 
  echo -a $ial(Dana).mark
At first, we mark Dana with ''This is Dana!'' and then we echo it.
+
At first, we mark ''Dana'' with ''This is Dana!'' and then we echo it.
  
To get all matching nickname, you could use:
+
To get all matching nicknames, you could use:
 
  ; at first initialize the looping-variable
 
  ; at first initialize the looping-variable
 
  [[var]] %i = 1
 
  [[var]] %i = 1

Revision as of 22:04, 21 November 2005

Returns the Nth address matching mask in the IAL.

$ial(nick/mask,N)

Properties: nick, user, host, addr, mark

If N is 0, it returns the total number of matching masks.

Example

echo -a $ial(*,0)

This example echos the total number of addresses in your IAL.

echo -a $ial(*Dana@staff.quakenet.org,1).nick

This one would echo Dana, as it's the first and probably only matching nick.

ialmark Dana This is Dana!
echo -a $ial(Dana).mark

At first, we mark Dana with This is Dana! and then we echo it.

To get all matching nicknames, you could use:

; at first initialize the looping-variable
var %i = 1
; begin to loop through all matching nicks. $ial(*staff*,0) returns the total amount of entry matching *staff*
while (%i <= $ial(*!*@staff.quakenet.org,0)) {
 ; echo them
 echo -a $ial(*!*@staff.quakenet.org,%i).nick
 ; increase looping variable
 inc %i
} 

This example would echo all nicks with the address *!*@staff.quakenet.org, that are in your IAL.