Difference between revisions of "$ial"

From Scriptwiki
Jump to: navigation, search
Line 1: Line 1:
Returns the Nth address matching mask in the [[IAL]].
+
Returns the Nth address matching mask in the IAL.
 
  $ial(nick/mask,N)
 
  $ial(nick/mask,N)
 +
 +
Properties: nick, user, host, addr, mark
  
 
If N is 0, it returns the total number of matching masks.
 
If N is 0, it returns the total number of matching masks.
Line 7: Line 9:
 
  [[echo]] -a $ial(*,0)
 
  [[echo]] -a $ial(*,0)
 
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
 +
This one would echo ''Dana'', as it's the first and probably one 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.
  
== See Also ==
+
To get all matching nickname, you could use:
To get more info about the Internal Address List, read [[:Category:IAL|IAL]].
+
; 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.
  
 
[[Category:Nick and Address Identifiers]][[Category:IAL]]
 
[[Category:Nick and Address Identifiers]][[Category:IAL]]

Revision as of 21:00, 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 one 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 nickname, 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.