$group » History » Version 6
Per Amundsen, 12/13/2019 06:32 PM
| 1 | 1 | Per Amundsen | _Added in 1.9.0_ |
|---|---|---|---|
| 2 | |||
| 3 | *$group(#|N)* |
||
| 4 | |||
| 5 | 3 | Per Amundsen | Returns the name or status of a [[Scripting_Groups|scripting group]] in a script. |
| 6 | 1 | Per Amundsen | |
| 7 | 5 | Per Amundsen | _See also [[/enable]], [[/disable]]._ |
| 8 | |||
| 9 | 1 | Per Amundsen | *Parameters* |
| 10 | |||
| 11 | #|N - Group name or if N = 0, number of groups, otherwise the Nth group. |
||
| 12 | |||
| 13 | *Properties* |
||
| 14 | |||
| 15 | .status - Returns on or off. |
||
| 16 | .fname - Returns the script filename in which the group exists. |
||
| 17 | .name - Returns name of the group. |
||
| 18 | 6 | Per Amundsen | .line - Line in the script where the group starts. *(AdiIRC only)* |
| 19 | 1 | Per Amundsen | |
| 20 | *Examples* |
||
| 21 | |||
| 22 | <pre> |
||
| 23 | 5 | Per Amundsen | ; Create a group. |
| 24 | 1 | Per Amundsen | #example on |
| 25 | alias Example { |
||
| 26 | echo -ag Group works |
||
| 27 | } |
||
| 28 | 2 | Per Amundsen | #example end |
| 29 | 1 | Per Amundsen | |
| 30 | ; Print number of groups. |
||
| 31 | //echo -ag $group(0) |
||
| 32 | |||
| 33 | ; Print the '#example' group status. |
||
| 34 | //echo -ag #example1 is $group(#example1).status |
||
| 35 | |||
| 36 | ; Disable the '#example' group |
||
| 37 | /disable #example |
||
| 38 | |||
| 39 | ; Print the '#example' group status again. |
||
| 40 | //echo -ag #example1 is $group(#example1).status |
||
| 41 | </pre> |