Table of Contents

# $EPIC: ischannel.txt,v 1.2 2006/08/01 03:40:36 sthalik Exp $

Synopsis:

$ischannel(<channel name>)

Technical:

Practical:

Some scripts like to prefix the # character to a channel name if you try to join a channel that isn't valid, as a shortcut. Such as:

alias join (channel, ...) {
  if (ischannel($channel)) {
    //join $channel $*
  } else {
    //join #$channel $*
  }
}

Returns:

1 if the argument is a valid name for a channel
0 if not.

Examples:

$ischannel(#blah)              returns true
$ischannel(&blah)              returns true
$ischannel(blah)               returns false

History:

This function first appeared in ircII-2.2pre1