Difference between revisions of "$chan (window)"

From Scriptwiki
Jump to: navigation, search
(used the standard table format)
m (htmltable -> wikitable)
Line 11: Line 11:
 
The following properties are available for $chan:
 
The following properties are available for $chan:
  
<table width="100%">
+
{| style="width:100%;"
<tr><td width="10%"><b>Property</b></td><td width="90%"><b>Description</b></td></tr>
+
|-
<tr><td>topic</td><td>the channel's topic</td></tr>
+
| style="width:10%;" | '''''Property'''''  || style="width:90%;" | '''''Description'''''
<tr><td>mode</td><td>the channel modes</td></tr>
+
|-
<tr><td>key</td><td>the channel key (if channel mode +k is set)</td></tr>
+
| topic   || the channel topic
<tr><td>limit</td><td>the channel limit (if channel mode +l is set)</td></tr>
+
|-
<tr><td valign="top">ial</td><td>$true when mIRC knows the addresses of all users on that channel, $inwho if mIRC is updating its address list, $false otherwise</td></tr>
+
| mode   || the channel modes
<tr><td>logfile</td><td>the logfile's path and filename for this channel</td></tr>
+
|-
<tr><td>stamp</td><td>$true when timestamps are enabled, $false if not</td></tr>
+
| key     || the channel key (if channel mode +k is set)
<tr><td>ibl</td><td>$true if mIRC knows the banlist for this channel, $inmode if it's currently updating its banlist, $false if it doesn't</td></tr>
+
|-
<tr><td>status</td><td>your status on that channel (e.g. ''joined'' or ''kicked'')</td></tr>
+
| limit   || the channel limit (if channel mode +l is set)
<tr><td>inwho</td><td>$true when mIRC is currently processing a /who request for that channel</td></tr>
+
|-
<tr><td>wid</td><td>the window ID for this channel</td></tr>
+
| ial     || $true when mIRC knows the addresses of all users on that channel, $inwho if mIRC is updating its address list, $false otherwise
<tr><td>hwnd</td><td>the window handle for this channel, can be used in DLLs</td></tr>
+
|-
</table>
+
| logfile || the logfile's path and filename for the channel
<br>
+
|-
 +
| stamp   || $true when timestamps are enabled, $false if not
 +
|-
 +
| ibl     || $true if mIRC knows the banlist for this channel, $inmode if it's currently updating its banlist, $false if it doesn't
 +
|-
 +
| status || your status on that channel (e.g. ''joined'' or ''kicked'')
 +
|-
 +
| inwho   || $true when mIRC is currently processing a /who request for that channel
 +
|-
 +
| wid     ||  the window ID for this channel
 +
|-
 +
| hwnd   || the window handle for this channel, can be used in DLLs
 +
|}
  
 
== Examples ==
 
== Examples ==

Revision as of 00:55, 27 November 2005

Using the $chan identifier you can get information about the channel(s) you're using.

$chan(N/#chan)

You can use a channel or a number for the first parameter. When you specify a channel, mIRC will return information about that particular channel, otherwise it returns information about the Nth channel. $chan returns the number of channels if N is 0 (zero).

When used without any parameters, $chan returns the channel where the current event (e.g. an on TEXT or on JOIN event) occured.

Note that if you get kicked from a channel and have the option 'leave channels open' enabled in the mIRC option dialog, $chan() will still contain that channel. If you want to get info about channels, you are really in, you'd have to use $comchan($me,0).

The following properties are available for $chan:

Property Description
topic the channel topic
mode the channel modes
key the channel key (if channel mode +k is set)
limit the channel limit (if channel mode +l is set)
ial $true when mIRC knows the addresses of all users on that channel, $inwho if mIRC is updating its address list, $false otherwise
logfile the logfile's path and filename for the channel
stamp $true when timestamps are enabled, $false if not
ibl $true if mIRC knows the banlist for this channel, $inmode if it's currently updating its banlist, $false if it doesn't
status your status on that channel (e.g. joined or kicked)
inwho $true when mIRC is currently processing a /who request for that channel
wid the window ID for this channel
hwnd the window handle for this channel, can be used in DLLs

Examples

$chan(#help.script)  ;returns #help.script if you're on that channel, $null otherwise
$chan(#help.script).topic  ;returns the topic, which is currently set for #help.script