Raw IRC

Someone mentioned to me that they don’t have a irc client today. This is no excuse, so of course I thought I will write a article on how to connect to a IRC channel through raw connection. For this example I am using netcat (nc) but you can also use telnet or similar.

First thing to do is to Connect. For example sake, I am using irc.freenode.org using port 6667.

nc irc.freenode.org 6667

If successful, it might reply you with a while about how your not authenticated and such, or some servers might not do that. You now have a short amount of time before it times out, so hurry. Next you need to tell the server who you are.

nick janitha

Now set up the usermodes and your name

user janitha 8 * janitha

Now you should be greeted with the irc server’s welcome banner and information, or if there are non set it might just do nothing. Depends on the server.

Now to see what channels it has to offer. Of course if its a big server that you know have thousands of channels, might not be a good idea since it will take a while dumping all the channels and information.

list

Its time we join something now. I am gonna go sip some coffee at our coffeestation channel (you can find me there anyway)

join #coffeestation

To see who else is on the channel once you join, you can do the following

names #coffeestation

And the most important thing is to be able to talk in a channel

privmsg #coffeestation hello world!

Or you can private message a individual now that you know the names

privmsg someperson hello, whats up

Now to get out of the channel you can use part, just like in a normal irc client

part #coffeestation

And now to finally quit

quit

You should also know of ping, which is to keep notified that your still there. Do this from time to time. It should return back with a pong.

ping irc.freenode.org

The other useful thing that comes to mind is whois, again works just like a normal irc client

whois someperson

Thats about all I can remember now. You can always hit google and look for more information. Below is a example of a full conversation starting from connect to quit. The commands I sent to server are in bold.

[j@trashbox ~]$ nc irc.freenode.org 6667
NOTICE AUTH :*** Looking up your hostname...
NOTICE AUTH :*** Found your hostname, welcome back
NOTICE AUTH :*** Checking ident
NOTICE AUTH :*** No identd (auth) response
nick janitha
user janitha 8 * janitha
:brown.freenode.net 001 janitha :Welcome to the freenode IRC Network janitha
...
:brown.freenode.net 376 janitha :End of /MOTD command.
:freenode-connect!freenode@freenode/bot/connect PRIVMSG janitha :VERSION
join #coffeestation
:janitha!n=janitha@1.2.3.4.my.ip.lol JOIN :#coffeestation
:brown.freenode.net 332 janitha #coffeestation :Come Sip Some Coffee
:brown.freenode.net 333 janitha #coffeestation dryicerx 1133157065
:brown.freenode.net 353 janitha = #coffeestation :janitha thoobik @dryicerx @nphase
:brown.freenode.net 366 janitha #coffeestation :End of /NAMES list.
names #coffeestation
:brown.freenode.net 353 janitha = #coffeestation :janitha thoobik @dryicerx @nphase
:brown.freenode.net 366 janitha #coffeestation :End of /NAMES list.
whois dryicerx
:brown.freenode.net 311 janitha dryicerx n=dryicerx 1.2.3.3.his.ip.lol * :dryicerx
:brown.freenode.net 319 janitha dryicerx :@#coffeestation
:brown.freenode.net 312 janitha dryicerx irc.freenode.net :http://freenode.net/
:brown.freenode.net 320 janitha dryicerx :is identified to services
:brown.freenode.net 318 janitha dryicerx :End of /WHOIS list.
privmsg #coffeestation hello coffee station
:dryicerx!n=dryicerx@1.2.3.3.his.ip.lol PRIVMSG #coffeestation :janitha: greetings
part #coffeestation
:janitha!n=janitha@1.2.3.3.my.ip.lol PART #coffeestation :
ping irc.freenode.org
:brown.freenode.net PONG brown.freenode.net :irc.freenode.org
quit
ERROR :Closing Link: 1.2.3.3.my.ip.lol (Client Quit)

Hope you find this informative, although its highly unlikely that a need arises to use a irc when you don’t have a irc client. Feel free to add anything in comments.