Project

General

Profile

$loop » History » Version 3

Per Amundsen, 02/23/2023 04:27 PM

1 1 Per Amundsen
_Added in 1.9.7_
2
3
*$loop(N, M, text)*
4
5
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'.
6
7 2 Per Amundsen
_\1 is replaced with $+ $1 $+._
8
9 1 Per Amundsen
*Parameters*
10
11 3 Per Amundsen
table(ktable).
12
|*Parameter*|*Description*|
13
| N | Starting number. |
14
| M | End number. (N + M = end) |
15
| text | The identifier(s) to execute. |
16 1 Per Amundsen
17
*Example*
18
19
<pre>
20
; Return a list of all nicks in the channel
21
//echo -ag $loop(1, $nick(#, 0), $nick(#, \1))
22
23
; Whois all nicks in a channel
24
alias iwhois {
25
  whois $1
26
}
27
//noop $loop(1, $nick(#, 0), $iwhois($nick(#, \1)))
28
</pre>