Difference between revisions of "$ial"
From Scriptwiki
m |
|||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
If N is 0, it returns the total number of matching masks. | If N is 0, it returns the total number of matching masks. | ||
+ | |||
+ | |||
+ | With no parameters, returns [[$true]] if the [[:Category:IAL|IAL]] is on, $false otherwise. | ||
+ | $ial | ||
+ | * This is an undocumented function. | ||
== Example == | == Example == | ||
Line 10: | Line 15: | ||
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 | + | 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 | + | 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 |
Latest revision as of 16:27, 22 April 2008
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.
With no parameters, returns $true if the IAL is on, $false otherwise.
$ial
- This is an undocumented function.
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.