|< Day Day Up >|
Hack 5 The IRC Model
If you are totally new to IRC, you may be wondering where to begin. Understand the conceptual model of Internet Relay Chat for a good start.
Internet Relay Chat was originally implemented so that users of bulletin board systems could chat with one another in real time. It has grown considerably since then, and thousands of networks of servers are now available for public use. The IRC protocol is text based, so programs that connect to IRC servers are easy to write.
2.2.1 Network of Servers
Each IRC network consists of at least one server. If there is more than one server, they are linked together to form a spanning tree. A spanning tree is a structure that allows each server in the network to communicate with all the other servers in the network, even if there is no direct connection between them. Because the servers in an IRC network are connected like this, two users can talk to each other even if they are using different servers on the same IRC network.
Anything that connects to an IRC server that is not another server is called a client. This includes the set of programs that most people use to chat with each other on IRC. An IRC client can connect directly to one of the servers on the IRC network and allow the user to chat with other users on the network. When a private message is sent to another client, it is sent via the IRC network, so there is no need for a separate connection to be made.
Each client that connects to an IRC network must have a unique nickname. Some servers still enforce a limit of nine characters for this nickname, but most servers these days allow much longer nicknames. Nicknames cannot contain spaces or certain punctuation characters.
Communication on IRC is not limited to just sending messages between pairs of users. IRC is very strongly oriented toward the concept of channels. A channel is something rather analogous to a room, where a group of clients can stay and chat as a whole. When a message is sent to a channel, all clients in that channel will receive it. The process of entering a channel is called joining , and leaving a channel is known as parting or leaving.
All channel names are unique and typically prefixed with a # character. These channels can be joined by anybody on the entire IRC network. Other prefixes exist, such as &, which is used for channels belonging only to a particular local server. In any case, channel names cannot contain spaces or commas.
For example, to join the channel #irchacks, you would type:
A channel does not actually exist until the first client joins it. The channel no longer exists after the last client has left. If the channel is configured to allow external messages, a client can send messages to the channel without needing to join it. Most channels disallow this, as it inevitably leads to abuse and confusion.
An individual client can join more than one channel, but for performance reasons, most servers impose a limit. When there is a limit, it is usually set to the recommended value of 10. If within the limit, a client can usually join any channel, but a couple of exceptions are worth noting. A channel can be configured to ban clients that have a nickname or host mask matching a particular pattern, thus preventing such clients from joining the channel. Channels can also be set to be "invite only," which means you must be invited by a user in the channel before you can join it.
An operator is a client that has special access to the IRC network. Operators can carry out maintenance tasks on the network, such as connecting and disconnecting other servers in the network. In extreme cases, operators may exercise their ability to forcibly remove users from the IRC network. Not only can they disconnect any client, but they can also prevent that client from reconnecting to the network.
2.2.5 Channel Operators
If you are the first client to join a channel, you will probably be made a channel operator for that channel. This allows you to kick other clients out of the channel and to set the topic if it is protected. If the channel is marked as "invite only," you can issue invitations to other clients on the network. A channel operator can also change the mode of the channel. This lets you do a variety of tasks including banning certain users from the channel or making other clients in the channel become channel operators like you. You can tell if a user is a channel operator, as he will have an @ character in front of his nickname. Most users refer to channel operators incorrectly as "operators," or more informally as "ops."
|< Day Day Up >|