From WikiChip
$chan Identifier - mIRC
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
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[(@wid/#/N).property]
Parameters
(@wid/#/N)The window id of the channel, a specific channel, or a channel number referencing the channel.
Properties
Property | Description |
---|---|
banlist | Returns $true if mode +b has been seen already, or $false if not, or $inmode if currently in a mode +b listing. |
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 IAL has been updated for the channel. |
ibl | Returns the same as banlist |
iql | Returns $true or $false if the IQL 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, kicked, or parted. |
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 Dec 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See Also
mIRC identifier list