< Day Day Up > |
Hack 86 Hypertext Links to IRC Channels
Looking for an easy way to get people to join your channel? Add IRC hyperlinks to your web pages. One way of making your IRC channel easily accessible is to increase the number of ways people can join it. Creating an HTML hyperlink that points to your IRC channel is a convenient way of letting people know the server details and channel name. To be able to use these links, you must have an IRC client installed that has chat link support enabled. If you have the ChatZilla IRC client installed, you can expect to be able to just click on IRC links to connect to the server and join the specified channel. In some other clients, such as mIRC, you will need to enable support for chat links, as shown in Figure 14-1. Figure 14-1. Enabling chat links in mIRC14.2.1 HTML IRC LinksIRC links are specified like any other hyperlink, but with irc as the protocol. Valid IRC links look like this: <a href="irc://irc-server:port/channel?key>Click to join</a> Each IRC URL can be broken up into four parts:
14.2.2 Example LinksIf you just want people to be able to connect to your IRC network in a hurry, you needn't bother specifying a channel to join: <a href="irc://irc.your-irc-server.com">Connect to my IRC server</a> If you have a channel on the freenode IRC network (irc.freenode.net) called #mychan and it has a key of "password", you could let web users visit your channel by providing the following link: <a href="irc://irc.freenode.net/mychan?password">Join my private channel</a> The most typical example you will see in use on the Web would be a link that points at a public channel, such as: <a href="irc://irc.freenode.net/irchacks">IRC Hacks Channel</a> Clicking on this hyperlink will launch your IRC client and join the #irchacks channel on the freenode IRC network. —Alex North |
< Day Day Up > |