$comchan: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
No edit summary
 
Doomie (talk | contribs)
changed to wiki table format
Line 2: Line 2:
  $comchan(nick,N)
  $comchan(nick,N)


<table border="1">
 
<tr><td><b>Property</b></td><td><b>Description</b></td></tr>
$comchan can have the following properties:
<tr><td>op</td><td>returns $true if you're an op on the channel</td></tr>
{| style="width:100%"
<tr><td>help</td><td>returns $true if you have help on the channel</td></tr>
|-
<tr><td>voice</td><td>returns $true if you have voice on the channel</td></tr>
| style="width:10%" | '''''Property''''' || Style="width:90%" | '''''Meaning'''''
</table>
|-
| op     || returns [[$true]] if you're an op on the channel
|-
| help     || returns $true if you have help on the channel
|-
| voice     || returns $true if you have voice on the channel
|}
 


== Example ==
== Example ==

Revision as of 01:03, 11 December 2005

Returns the names of channels which both you and nick are on.

$comchan(nick,N)


$comchan can have the following properties:

Property Meaning
op returns $true if you're an op on the channel
help returns $true if you have help on the channel
voice returns $true if you have voice on the channel


Example

This example will return all comchans you have with someone:

; begin a new alias, we want to have something like $comchans(<nick>).
alias comchans {
  var %i = 1, %comchans
  ; begin to loop through all comchans
  while (%i <= $comchan($1, 0)) {
    ; set %comchans to all common channels, seperated by space (ascii 32)
    %comchans = $addtok(%comchans, $comchan($1,%i),32)
    ; increase looping-variable
    inc %i
  }
  ; return %comchans
  return %comchans
}

See Also

To get all the channels you are in, look at $chan.