O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  


 
Buy the book!
IRC Hacks
By Paul Mutton
July 2004
More Info

HACK
#8
Register with NickServ
All nicknames on an IRC network must be unique, so if someone steals your nickname, you won't be able to use it. Protect your nickname and get it back with NickServ
[Discuss (2) | Link to this hack]

It may have happened to you already—someone trying to impersonate you or just "stealing" your nickname for the fun of it. NickServ will solve this problem for you.

Impersonating someone on IRC is quite easy. When logging in, you can specify your nickname, and the server will never check whether you really are who you pretend to be. This could be considered a weakness. Fortunately, NickServ tries to fix this weakness.

NickServ is one of the Services available on a large number of IRC networks. It sits on the IRC network and sees all the connecting and disconnecting users and nick changes. Of course, just that isn't enough. When you register your nickname with NickServ, you can ask NickServ to kill someone if they are already logged in with your nickname. This can be useful when someone's impersonating you, but it's probably even more useful if your Internet connection fails and you have to log back in—your old session will probably still be active on the server, so you won't be able to use your regular nickname. But if you ask NickServ to kill your old connection, you can take your nickname back.

A more important advantage of registering your nickname with NickServ is that it allows you to register new channels with ChanServ and/or be in channel access lists. This means, among other things, that you can get channel operator status from ChanServ .

Registering Yourself with NickServ

The first step is to register your nickname. This is quite easy on most IRC networks, as all you have to do is send a register message to NickServ. To do this on the freenode IRC network, open a query with NickServ and send the register message like this:

<Wilmer> register password
<NickServ> Your nickname is now registered under the hostmask [*~blabla@*.ipv6.gaast.net].
<NickServ> Your password is [password].  Please remember this for later use.
<NickServ> Freenode is a service of Peer-Directed Projects Center, an
<NickServ> IRS 501(c)(3) (tax-exempt) charitable and educational organization.
<NickServ> For frequently-asked questions about the network, please see the
<NickServ> FAQ page (http://freenode.net/faq.shtml).

If someone else has already registered this nickname, you'll receive an error message and you'll just have to pick a different nickname. Sadly, nicknames on IRC are very much a first-come first-served affair. After you have registered, you can check to see if everything worked by reconnecting to the IRC server. You should receive the following message:

<NickServ> This nickname is owned by someone else
<NickServ> If this is your nickname, type /msg NickServ IDENTIFY <password>

You should then do what NickServ told you to do, so type:

/msg NickServ IDENTIFY password

If everything goes correctly, NickServ will recognize you and mark you as registered. You can check whether you (or someone else) are indeed identified correctly using the info command. This is also sent as a private message to NickServ, for example:

<Wilmer> info Wilmer
<NickServ>            Nickname: wilmer << ONLINE >>
<NickServ>          Registered: 1 year 50 weeks 3 days (23h 21m 18s) ago
<NickServ>  Last Seen Quit Msg: ballard.freenode.net irc.freenode.net
<NickServ>       Email Address: wilmer@gaast.net
<NickServ>                 UIN: 267762
<NickServ>    Nickname Options: Secure, AllowMemos, MemoNotify, MemoSignon

If you don't see the << ONLINE >> text behind your nickname or any other sign of you being identified, you can be sure something went wrong. NickServs on other IRC networks may behave slightly differently, so be prepared to accept some different formatting of the output. In particular, some NickServs require you to specify your email address as a second argument when you register.

If you still have problems, it's probably a good idea to read the help information. Most (if not all) NickServs will give you more information about how they work when you send them a help command in a private message:

/msg NickServ help

Usually, you can get more information about a specific command by adding it as an argument to the help command:

/msg NickServ help register

One command you might find interesting is the set command. This is used to change your settings. You can use it to set a new password, enable stronger security, and automatically authenticate using your hostname. You can use it to set your contact information, such as your email address, which people will get when they use the info command shown earlier.

TIP

Automatic authentication based on hostnames may sound convenient, but it's sometimes a bad idea. If you're running your IRC client on a Unix machine that is also used by other people, it makes it very easy for others to fool NickServ. If you think having to send a password every time you log in is annoying, there are scripts that can do this for you.


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.