From WikiChip
mirc/identifiers/$chan
The $chan identifier is filled during events which trigger on a channel.
The $chan identifier can also be used to get information regarding a specific channel the local mIRC client is in.
Synopsis
$chan[(#/N).property]
Parameters
(#/N)The specific channel, or channel number referencing the channel.
.propertyGet the results of a specific property request for the specified channel or N.
Properties
Property | Description |
---|---|
cid | Returns the connection ID for the channel. |
hwnd | Returns the operating system's actual window handle for the channel. |
ial | Returns $true or $false if the [Internal address list - mIRC|IAL]] has been updated for the channel. |
ibl | Returns $true or $false if the IBL has been updated for the channel |
idle | Returns the amount of time the channel has been idle. This does not include entries made from the local mIRC client. |
iel | Returns $true or $false if the local mIRC client is on the channel's internal exempt list. |
iil | Returns $true or $false if local mIRC client is on the channel's internal invite list. |
inwho | Returns $true or $false if a /who command has been performed on the channel, and the results are still being processed. |
key | Returns the channel's key. |
limit | Returns the amount of users the channel is limited to. |
logfile | Returns the location of the current channel's log file, if any. |
mode | Returns the current modes set in the channel. |
stamp | Returns $true or $false if time stamping is enabled on the channel. |
status | Returns: joining, joined, or kicked. |
topic | Returns the channel topic. |
wid | Returns the mIRC application's window id for the channel window. |
Examples
Create an alias that opens a custom @window which loads some basic information about the active channel:
alias getDetails { if ($active ischan) { var %c = $active window @getDetails 350 350 650 200 clear @getDetails echo @getDetails Channel: %c echo @getDetails $crlf $crlf echo @getDetails Topic: $chan(%c).topic echo @getDetails $crlf $crlf echo @getDetails Modes: $chan(%c).mode echo @getDetails $crlf $crlf echo @getDetails Key: $iif($chan(%c).key,$v1,No key set) } }
This custom alias can now be executed using the following command in a channel command-line:
/getDetails
The results of this command will look similar to the results below:
Compatibility
Added: mIRC v4.7
Added On: 09/12/96