Difference between revisions of "$ial"
From Scriptwiki
m |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Returns the Nth address matching mask in the | + | 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. | ||
+ | |||
+ | |||
+ | With no parameters, returns [[$true]] if the [[:Category:IAL|IAL]] is on, $false otherwise. | ||
+ | $ial | ||
+ | * This is an undocumented function. | ||
== Example == | == Example == | ||
[[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 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. | ||
− | [[Category:Nick and Address Identifiers]] | + | [[Category:Nick and Address Identifiers]][[Category:IAL]] |
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.