# $EPIC: winchan,v 1.3 2005/03/12 01:37:28 jnelson Exp $
Synopsis:
   $winchan(<window refnum/name>|<channel>)

Technical:
   $winchan() and $chanwin() are the same function.

   If no argument given: 
	Return the current window's current channel.
   If one argument, and it's a window refnum:
	Return that window's current channel.
   If one argument, and it's a channel:
	Return the window that the channel belongs to.
   If two arguments, first one is channel, second one is server:
        Return the window FOR THAT SERVER that the channel belongs to.
 
Examples:
   /window refnum 2;/join #epic
   eval echo $winchan(2)                   /* returns #epic */
   eval echo $winchan(#epic)               /* returns 2 */

History:
   $winchan() first appeared in EPIC4pre0.034.
   $winchan() was swapped with $winchan() in EPIC4pre1.027
   $winchan() and $chanwin() were unified in EPIC4pre1.041
   $winchan() first supported non-current channels in EPIC4pre2.506.

