From WikiChip
Difference between revisions of "mirc/identifiers/$chan"
m (bot: correcting title) |
m (→Properties: Add missing "parted" response.) |
||
(10 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
The '''$chan''' identifier can also be used to get information regarding a specific channel the local mIRC client is in. | The '''$chan''' identifier can also be used to get information regarding a specific channel the local mIRC client is in. | ||
+ | |||
== Synopsis == | == Synopsis == | ||
− | <pre>$chan[(#/N).property]</pre> | + | <pre>$chan[(@wid/#/N).property]</pre> |
== Parameters == | == Parameters == | ||
− | <span style="display: inline-block; width: 105px;">'''(#/N)'''</span>The specific channel, or channel number referencing the channel | + | <span style="display: inline-block; width: 105px;">'''(@wid/#/N)'''</span>The window id of the channel, a specific channel, or a channel number referencing the channel. |
− | |||
− | |||
== Properties == | == Properties == | ||
Line 15: | Line 14: | ||
|- | |- | ||
! Property !! Description | ! Property !! Description | ||
+ | |- | ||
+ | | '''banlist''' || Returns {{mIRC|$true}} if mode +b has been seen already, or {{mIRC|$false}} if not, or {{mIRC|$inmode}} if currently in a mode +b listing. | ||
|- | |- | ||
| '''cid''' || Returns the connection ID for the channel. | | '''cid''' || Returns the connection ID for the channel. | ||
Line 20: | Line 21: | ||
| '''hwnd''' || Returns the [[Operating system|operating system's]] actual [[hWnd|window handle]] for the channel. | | '''hwnd''' || Returns the [[Operating system|operating system's]] actual [[hWnd|window handle]] for the channel. | ||
|- | |- | ||
− | | '''ial''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the | + | | '''ial''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the {{mirc|Internal address list|IAL}} has been updated for the channel. |
+ | |- | ||
+ | | '''ibl''' || Returns the same as '''banlist''' | ||
|- | |- | ||
− | | ''' | + | | '''iql''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the {{mirc|Internal quiet list|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. | | '''idle''' || Returns the amount of time the channel has been idle. This does not include entries made from the local mIRC client. | ||
Line 42: | Line 45: | ||
| '''stamp''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if [[time stamping - mIRC|time stamping]] is enabled on the channel. | | '''stamp''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if [[time stamping - mIRC|time stamping]] is enabled on the channel. | ||
|- | |- | ||
− | | '''status''' || Returns: '''joining''', '''joined''', or ''' | + | | '''status''' || Returns: '''joining''', '''joined''', '''kicked''', or '''parted'''. |
|- | |- | ||
| '''topic''' || Returns the channel topic. | | '''topic''' || Returns the channel topic. | ||
Line 77: | Line 80: | ||
== See Also == | == See Also == | ||
− | * | + | * {{mirc|on join}} |
− | * | + | * {{mirc|on part}} |
* {{mIRC|$ial}} | * {{mIRC|$ial}} | ||
* {{mIRC|$ibl}} | * {{mIRC|$ibl}} | ||
Line 84: | Line 87: | ||
{{mIRC identifier list}} | {{mIRC identifier list}} | ||
− | [[Category: | + | [[Category:mIRC identifiers|chan]] |
Latest revision as of 13:59, 17 February 2024
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[edit]
$chan[(@wid/#/N).property]
Parameters[edit]
(@wid/#/N)The window id of the channel, a specific channel, or a channel number referencing the channel.
Properties[edit]
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[edit]
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[edit]
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[edit]
mIRC identifier list