$comchan

From Scriptwiki
Revision as of 02:03, 11 December 2005 by Doomie (talk | contribs) (changed to wiki table format)

Jump to: navigation, search

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.