Project

General

Profile

$loop » History » Revision 2

Revision 1 (Per Amundsen, 07/10/2015 12:04 PM) → Revision 2/3 (Per Amundsen, 10/28/2020 10:58 PM)

_Added in 1.9.7_ 

 *$loop(N, M, text)* 

 Starts a loop from 'N' to 'M' and executes 'text' with $1 and \1 as the current number and returns a space separated text from the result of 'text'. 

 _\1 is replaced with $+ $1 $+._ 

 *Parameters* 

 N - Starting number. 
 M - End number. (N + M = end) 
 text - The identifier(s) to execute. 

 *Example* 

 <pre> 
 ; Return a list of all nicks in the channel 
 //echo -ag $loop(1, $nick(#, 0), $nick(#, \1)) 

 ; Whois all nicks in a channel 
 alias iwhois { 
   whois $1 
 } 
 //noop $loop(1, $nick(#, 0), $iwhois($nick(#, \1))) 
 </pre>