MSCFOSS/DIF122/Software Development Practices/Unit IV/Instant Chat

From Amachu
Jump to: navigation, search

Contents

Introduction

  • People from across the globe take part in Open Source Software development, support.
  • People work in teams & these teams need to meet frequently share things across & many time take decisions arriving at mutual consensus.
  • Even training sessions are conducted over IRC sessions.
  • The most preferred destination of many Open Source Projects is a channel at a Server called irc.freenode.net

Internet Relay Chat

Background

In the early days of the internet the only way for users to talk to each other in real time was through a Unix program called "Talk". Talk had a horizontally split screen. Keystrokes typed by one user appeared on the top, while keystrokes typed by a second user on the same system appeared on the bottom half of the screen. It was awkward to say the least... every pause, every typo and its correction, was visible to the other party.

In 1988 a young university student in Oslo, named Jarkko Oikarinen, was assigned the project of creating a better system that would allow multiple users to talk to each other over the internet. Jarkko invented Internet Relay Chat. His system was also based in unix, but it created "channels" for streaming conversation that users could tap into, or "join". Type a sentence into an input box, hit enter, your text would be sent to a channel and all others in that channel would see it.

The system was just the solution for small groups of people - twenty at most - to hold meetings online. Perfect for the university IT departments that set up small IRC servers, and when some of those servers linked to each other, the first IRC network was born.

What is IRC

Internet Relay Chat, commonly abbreviated IRC, is a chat protocol, a way how to enable several people to talk to each other by entering text messages.

A computer running irc software (ircd) is called an IRC "server". Your computer talks to the IRC server using software called an IRC "client".

                    <----> client
Chat Server <----> client
                    <----> client

Clients send commands to, and receive information from, the IRC server. The way the user sees this is the ability to talk to other users in channels and thru private message, and send commands to the server, such as /join, /part, and setting user modes.

Once connected to an IRC server, clients can connect directly to other users, and even send files to each other, with a process appropriately called DCC, or direct client to client.

What is an IRC network?

IRC servers can hold a limited number of users, and users geographically close to the server usually have a more stable connection with less lag. So, rather than have all users connect to one overcrowded server that may be far from their home, it makes more sense to link together several servers in different locations. These groups of linked servers are called IRC networks.

There are over 600 active IRC networks, hundreds more webchats, and scores of commercial chat services, large and small.

Freenode

freenode is a service of Peer-Directed Projects Center (PDPC). freenode provides discussion facilities for the Free and Open Source Software communities, for not-for-profit organizations and for related communities and organizations. In 1998, the network had about 200 users and less than 20 channels. Ten years down the line the network currently peaks at just over 70,000 users, freenode provides facilities to a variety of groups and organizations.

Using Internet Relay Chat

To use Internet Relay Chat, you need to do the following:

  1. Choose and install an IRC client.
  2. Find the channel discussing the topic of your interest (similar to a room in other chat environments).
  3. Find the server at which the channel is located. You can be directed to both the server and the channel by the website of a project, such as Wikibooks.
  4. Connect to the server using the client, using a nickname of your choice.
  5. Connect to the channel (a room).

IRC clients

To use IRC, you'll need an IRC client--a program that lets you connect to an IRC server, and enter an IRC channel. There is a variety of IRC clients:

Some IRC clients
IRC Client Description OS Restrictions Note
Freenode's webchat A webspace offered by the network itself to connect to channels Running http://qwebirc.org
ChatZilla An add-in for Firefox.
IRSSI Has a text-only user interface.
mIRC Windows Good for beginners.
XChat (XChat-WDK for Windows)
Smuxi A user-friendly client for GNOME. Linux and Windows
Colloquy For Mac OS X only.
Pidgin A multi-protocol client. Has more chat protocols than IRC.

Registering your nickname

Some IRC networks offer to register your nickname through a service bot. This provides sometimes access to channels that are blocked to unregistered users and in most cases reserves your nickname so no one else can use it (it will at least mark you as the logged in user and anyone else who uses it as not logged in).

The service bots providing this is mostly named "NickServ", sometimes also "AuthServ" or on a big network just "Q". When you found out which one of those bots exists, you can gather more information by typing:

/msg [BOTNAME] help

This should get you detailed instructions on how to use the service.

Example HowTo for a network

The process is fairly simple, once you have chosen a nickname you would like to register (assuming it's not owned by anyone else) and chosen a password, follow these steps:

  • If you have not done so already, change your nickname to the one you would like to register
/nick [NICKNAME]

For example:

/nick JohnDoe
  • Send a private message to the network's nickserv service with the password you chose and your email address with
/msg nickserv register [PASSWORD] [EMAIL]

For example:

/msg nickserv register 1234abcd JohnDoe@email.com
  • After messaging the nickserv you should shortly receive a reply back stating that the it received your registration request and sent an email to the address you provided.
An email containing nickname activation instructions has been sent to JohnDoe@email.com
  • To complete the registration process, you will need to message the nickserv with the registration code emailed to your address.
/msg NickServ VERIFY REGISTER JohnDoe p4huc5gqunnc
  • Once you have correctly entered the registration code, the nickserv should message you back stating the nick registration process was completed successfully.
JohnDoe has now been verified.

You should now be "logged in" under your nick. If you disconnect from the server, to relogin under your nick you will need to message the nickserv with your password:

/msg nickserv identify [PASSWORD]

For example:

/msg nickserv identify 1234abcd

Once doing so, it should reply back saying you successfully logged in.

You are now identified for JohnDoe

Private conversations and chats

By default, the conversations using IRC are public, visible to all users in the channel.

To have a private conversation with a user in the channel, type "/query nickname".

To have a private chat, join an non-existent channel, and then allow joining only by invitation using the command "/mode +i". Chunked into steps:

  1. /join #mynewchannel
  2. /mode +i
  3. /invite someotherguy

IRC commands

What follows is an overview of some of the basic commands of the IRC protocol. All the commands are already prefixed with a slash "/", as in most clients this will indicate that an IRC command follows that shall be executed. With some IRC clients including ChatZilla and Pidgin, you do not need to know these commands: you tell the client what you want to do using the graphical user interface and the client sends the necessary commands for you.

Basic commands

Some basic commands for IRC are listed in the following section. Please note that not all of them are available in all clients, as some of them are client-sided inventions to make your life easier and not part of the IRC protocol itself.

Command What it does Example
/attach

/server

/connect

Sign on to a server /attach irc.freenode.net

/server irc.freenode.net

/connect irc.freenode.net

/nick Set your nickname /nick YourName
/join Join a channel /join #wikibooks
/msg Sends a message (can either be private or to the entire channel) Message the channel: /msg #wikibooks hello world!

Send a private message: /msg JohnDoe Hi john.

/whois Display information about a user on the server /whois JohnDoe
/clear

/clearall

Clears a channel's text.

Clears all open channel's text.

/clear

/clearall

/away Sets an away message. To return from "away", type /away or send a message. /away I'm away because...
/me Sends an action to the channel. See example. The following:

/me loves pie.

would output to the chat in the case of JohnDoe:

JohnDoe loves pie.

/topic Querries or sets the topic of discussion. /topic Using IRC
/part #channel to leave a channel /part #mscfoss
/quit to exit IRC /quit
/nick newnick changes your IRC nickname. /nick Dragon

Channel creation

Channels are created merely by joining them (if not already in use). The /msg Chanserv register #CHANNEL_NAME command is used to formally register a channel in a permanent manner and to allow default settings including access controls to be defined.

When you define a channel, you are listed as its founder, (flag = +F). As such you have ownership and control over the channel. if the channel is to be used long term, it is wise to grant others this flag +F as well, in case you become absent in future:

/msg Chanserv flags #CHANNEL_NAME USER_ACCOUNT +F
Eg: /msg Chanserv flags #wikimedia-stewards bastique +F

Channel Operations

Using MODE command — as a channel operator — one can set certain channel modes that affect the channel. Modes can be removed by using the - sign instead. Mode changes can also be stacked on the same command line, as in /MODE #mychannel +im.

mode mnemonic property example comments
b ban users matching this user mask cannot join the channel nor talk on the channel
/MODE #mychannel +b 
*!*@*saunalahti.fi
You would typically ban someone if he acted in an abusive fashion and kicking him did not keep him from coming back and repeating the offense. A user can usually change his nickname right away, and can often obtain a new IP address by hanging up and redialling, so you will probably want to ban whole domains, or in the absence of reverse DNS, networks (e.g. /MODE #mychannel +b *!*@192.0.2.*)
i invite-only only invited users may join the channel
/MODE #mychannel +i
k key only users who enter this password may join the channel
/MODE #mychannel +k secret
Users will need to enter the password as a parameter to the JOIN command, e.g. /JOIN #mychannel secret
l limit maximum user limit
/MODE #mychannel +l 10
m moderation only "voiced" users will be able to talk on the channel
/MODE #mychannel +m
n no external messages only users on the same channel will be able to send messages into the channel
/MODE #mychannel +n
Otherwise users will be able to use PRIVMSG to send to the channel even if they are not on it
o operator give someone channel operator status
/MODE #mychannel +o MyFriend
You should be careful when giving ops, because you are basically giving away the channel. Never op someone you would not trust the channel to, and never op someone without being certain he really is who you think he is (it is easy to modify one's nickname and "real name" so that they match someone else's). On the other hand your channel should have enough ops, otherwise it may easily become stuck in an opless status
p private make the channel "private"
/MODE #mychannel +p
A private channel will not be included in a reply to NAMES command, unless the user issuing the command is on that channel
s secret make the channel "secret"
/MODE #mychannel +s
A secret channel will not be included in a reply to a LIST or NAMES command, unless the user issuing the command is on that channel
t topic prevent normal users (i.e. non-chanops) from setting the channel topic
/MODE #mychannel +t
v voice give someone a voice, i.e. allow him to speak on the channel
/MODE #mychannel +v MyFriend
Technically, this is relevant only if the channel is moderated (mode +m). However, some non-moderated channels use this voice flag to denote loyal and trusted non-chanop users

Invite & Kick

command mnemonic property example comments
INVITE Invite invite someone to the channel
/INVITE MyFriend #mychannel
Do it as channel operator
KICK Kick remove someone from the channel
/KICK #mychannel Jeff Abusive language
The comment is optional. Do it as channel operator.
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
Print/export