From WikiChip
Difference between revisions of "mirc/identifiers/$chan"
< mirc‎ | identifiers

m (Bot: Adding a template (template:mIRC identifier list))
m (Properties: Add missing "parted" response.)
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
The '''$chan''' identifier is filled during events which trigger on a channel.
+
{{mirc title|$chan Identifier}}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.
 
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.
 
 
<span style="display: inline-block; width: 105px;">'''.property'''</span>Get the results of a specific property request for the specified '''channel''' or '''N'''.
 
  
 
== 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 '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - mIRC|$false]]''' if the [Internal address list - mIRC|IAL]] has been updated for the channel.
+
| '''ial''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the {{mirc|Internal address list|IAL}} has been updated for the channel.
 
|-
 
|-
| '''ibl''' || Returns '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - mIRC|$false]]''' if the [[Internal ban list - mIRC|IBL]] 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.
 
|-
 
|-
| '''iel''' || Returns '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - mIRC|$false]]''' if the local mIRC client is on the channel's internal exempt list.
+
| '''iel''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if the local mIRC client is on the channel's internal exempt list.
 
|-
 
|-
| '''iil''' || Returns '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - mIRC|$false]]''' if local mIRC client is on the channel's internal invite list.
+
| '''iil''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if local mIRC client is on the channel's internal invite list.
 
|-
 
|-
| '''inwho''' || Returns '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - mIRC|$false]]''' if a [[/who command - mIRC|/who command]] has been performed on the channel, and the results are still being processed.
+
| '''inwho''' || Returns '''{{mIRC|$true}}''' or '''{{mIRC|$false}}''' if a [[/who command - mIRC|/who command]] has been performed on the channel, and the results are still being processed.
 
|-
 
|-
 
| '''key''' || Returns the channel's key.
 
| '''key''' || Returns the channel's key.
Line 40: Line 43:
 
| '''mode''' || Returns the current modes set in the channel.
 
| '''mode''' || Returns the current modes set in the channel.
 
|-
 
|-
| '''stamp''' || Returns '''[[$true identifier - mIRC|$true]]''' or '''[[$false identifier - 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 '''kicked'''.
+
| '''status''' || Returns: '''joining''', '''joined''', '''kicked''', or '''parted'''.
 
|-
 
|-
 
| '''topic''' || Returns the channel topic.
 
| '''topic''' || Returns the channel topic.
Line 74: Line 77:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v4.7
+
{{mIRC compatibility|4.7}}
 
 
Added On: 09/12/96
 
  
 
== See Also ==
 
== See Also ==
* [[On join - mIRC|ON JOIN]]
+
* {{mirc|on join}}
* [[On part - mIRC|ON PART]]
+
* {{mirc|on part}}
* [[$ial identifier - mIRC|$ial]]
+
* {{mIRC|$ial}}
* [[$ibl identifier - mIRC|$ibl]]
+
* {{mIRC|$ibl}}
* [[$nick identifier - mIRC|$nick]]
+
* {{mIRC|$nick}}
 
{{mIRC identifier list}}
 
{{mIRC identifier list}}
  
[[Category:MIRC identifiers]]
+
[[Category:mIRC identifiers|chan]]

Latest revision as of 13:59, 17 February 2024

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:

Custom example for the $chan identifier - mIRC

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]

v · d · e mIRC identifier list

$ $$, $, $0, $1-, $!, $&, $*, $+, $++, $?

A $abook, $abs, $acos, $active, $activecid, $activewid, $adate, $address, $addtok, $addtokcs, $agent, $agentname, $agentstat, $agentver, $alias, $and, $anick, $ansi2mirc, $aop, $appactive, $appstate, $asc, $asctime, $asin, $atan, $atan2, $auto, $avoice, $away, $awaymsg, $awaytime

B $banlist, $banmask, $base, $beta, $bfind, $bindip, $bitoff, $biton, $bits, $bnick, $bvar, $bytes

C $calc, $caller, $cancel, $cb, $cd, $ceil, $chan, $chanmodes, $channel, $chantypes, $chat, $chr, $cid, $clevel, $click, $cmdbox, $cmdline, $cnick, $color, $colour, $com, $comcall, $comchan, $comchar, $comerr, $compact, $compress, $comval, $cos, $cosh, $count, $countcs, $cr, $crc, $creq, $crlf, $ctime, $ctimer, $ctrlenter

D $date, $day, $daylight, $dbuh, $dbuw, $dccignore, $dccport, $dde, $ddename, $debug, $decode, $decompress, $deltok, $devent, $dialog, $did, $didreg, $didtok, $didwm, $dir, $disk, $dlevel, $dll, $dllcall, $dname, $dns, $donotdisturb, $dqwindow, $duration

E $ebeeps, $editbox, $email, $emailaddr, $encode, $envvar, $error, $eval, $evalnext, $event, $eventid, $eventparms, $exists, $exiting

F $false, $feof, $ferr, $fgetc, $file, $filename, $filtered, $find, $finddir, $finddirn, $findfile, $findfilen, $findtok, $findtokcs, $fline, $flinen, $floor, $font, $fopen, $fread, $fromeditbox, $fserv, $fserve, $fulladdress, $fulldate, $fullname, $fullscreen

G $get, $getdir, $getdot, $gettok, $gmt, $group

H $halted, $hash, $height, $hfile, $hfind, $hget, $highlight, $hmac $hmatch, $hnick, $host, $hotline, $hotlinepos, $hotlink, $hotp, $hregex, $hypot

I $iaddress, $ial, $ialchan, $ibl, $idle, $iel, $ifmatch, $ifmatch2, $ignore, $iif, $iil, $inellipse, $ini, $initopic, $inmidi, $inmode, $inmp3, $inpaste, $inpoly, $input, $inrect, $inroundrect, $insong, $insongpause, $instok, $int, $intersect, $inwave, $inwho, $ip, $iptype, $iql, $isadmin, $isalias, $isbit, $isdde, $isdir, $isfile, $isid, $islower, $istok, $istokcs, $isupper, $isutf

K $keychar, $keyrpt, $keyval, $knick

L $lactive, $lactivecid, $lactivewid, $left, $leftwin, $leftwincid, $leftwinwid, $len, $level, $lf, $line, $lines, $link, $lock, $locked, $lof, $log, $log10, $logdir, $logstamp, $logstampfmt, $longfn, $longip, $lower, $ltimer

M $maddress, $mask, $matchkey, $matchtok, $matchtokcs, $maxlenl, $maxlenm, $maxlens, $md5, $me, $menu, $menubar, $menucontext, $menutype, $mid, $mididir, $mircdir, $mircexe, $mircini, $mkfn, $mklogfn, $mknickfn, $mnick, $mode, $modefirst, $modelast, $modespl, $mouse, $mousecx, $mousecy, $mousedx, $mousedy, $mousekey, $mouselb, $mousex, $mousey, $mousewin, $mp3, $mp3dir, $msfile, $msgstamp, $msgtags

N $N, $naddress, $network, $newnick, $nhnick, $nick, $nickmode, $no, $nofile, $nopath, $nopnick, $noqt, $not, $notags, $notify, $null, $numeric, $numtok, $nvnick

O $ok, $online, $onlineserver, $onlinetotal $onpoly, $opnick, $or, $ord, $os

P $parmN, $parms, $parseline, $parsetype, $parseutf, $passivedcc, $pi, $pic, $play, $pnick, $portable, $portfree, $pos, $poscs, $prefix, $prop, $protect, $puttok

Q $qt, $query

R $r, $raddress, $rand, $rands, $rawbytes, $rawmsg, $read, $readini, $readn, $regbr, $regerrstr, $regex, $regml, $regmlex, $regsub, $regsubex, $remote, $remove, $removecs, $remtok, $remtokcs, $replace, $replacecs, $replacex, $replacexcs, $reptok, $reptokcs, $result, $rgb, $right, $rnick, $round

S $samepath, $scid, $scon, $script, $scriptdir, $scriptline, $sdir, $send, $server, $serverip, $servertarget, $sfile, $sha1, $sha256, $sha384, $sha512, $shortfn, $show, $signal, $sin, $sinh, $site, $sline, $snick, $snicks, $snotify, $sock, $sockbr, $sockerr, $sockname, $sorttok, $sorttokcs, $sound, $speak, $sqrt, $sreq, $ssl, $sslcertsha1, $sslcertsha256, $sslcertvalid, $ssldll, $ssllibdll, $sslready, $sslversion, $starting, $status, $str, $strip, $stripped, $style, $submenu, $switchbar, $sysdir

T $tan, $tanh, $target, $tempfn, $ticks, $time, $timeout, $timer, $timestamp, $timestampfmt, $timezone, $tip, $tips, $titlebar, $token, $toolbar, $topic, $totp, $treebar, $true, $trust

U $ulevel, $ulist, $unsafe, $upper, $uptime, $url, $usermode, $utfdecode, $utfencode

V $v1, $v2, $var, $vc, $vcmd, $vcmdstat, $vcmdver, $version, $vnick, $vol

W $wavedir, $wid, $width, $wildsite, $wildtok, $wildtokcs, $window, $wrap

X $xor

Y $yes

Z $zip

= =$nick