ischannel
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | ischannel [2006/08/01 03:45] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: ischannel.txt, | ||
+ | ======Synopsis: | ||
+ | $__ischannel__(< | ||
+ | |||
+ | ======Technical: | ||
+ | * This function returns 1 if <channel name> is a valid channel name, and 0 if it is not a valid channel name. | ||
+ | * A channel is " | ||
+ | * This function does **NOT** tell you whether or not a channel exists. | ||
+ | |||
+ | ======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. | ||
+ | |||
+ | < | ||
+ | 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(# | ||
+ | $ischannel(& | ||
+ | $ischannel(blah) | ||
+ | </ | ||
+ | |||
+ | ======History: | ||
+ | This function first appeared in ircII-2.2pre1 | ||
ischannel.txt · Last modified: 2006/08/01 03:45 by 127.0.0.1