$comchan

From Scriptwiki
Revision as of 19:40, 19 November 2005 by Doomie (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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

$comchan(nick,N)
PropertyDescription
opreturns $true if you're an op on the channel
helpreturns $true if you have help on the channel
voicereturns $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.