The identifier $chantypes is set when you connect to a network and is collected from the following line that is sent from the network to you on connecting;

:server.network.net 005 nickname NOQUIT SAFELIST MODES=6 MAXCHANNELS=15 MAXBANS=100 NICKLEN=30 TOPICLEN=307 KICKLEN=307 [color:red]CHANTYPES=#
PREFIX=(ov)@+ SILENCE=10 :are available on this server
[/color]
What it does, is tell you which types of channels are avaliable, the most common channel type is # however some networks support &channel, so you can;

/join #channel
/join &channel

On some networks you might find &channels are SERVER based, i.e. if you are on server2 in &channel and someone else is on server1 in &channel, you will NOT be able to see each other.

However if you are both on server1 in &channel, you will.. #channels are usually network based, i.e. everyone on the network will see each other. Saying that, this depends ENTIRELY on the server and can differ.

Examples;

/server mesra.dal.net - DALnet, supports only #channels, /join #channel

/server irc.quaknet.org - Quakenet, supports both #channels and &channel; /join #channel, however /join &channel is stopped by certain (perhaps all) servers when you attempt to join.

/server irc.undernet.org - Undernet, allows you to join both types of channels freely.

Eamonn.