User:K6ka/IRC handbook/IRC services

The nature of IRC, by default, is to "never remember". Channels, and any information associated with them, will be deleted when they become empty. If you disconnect from IRC and then rejoin, the server will think you're a totally different person. And the latter point means that, if you disconnect from IRC, anyone can take your nickname, and since the nature of IRC is to forget everything, it will not even recognize you as being the former user of that nickname.

This was fine for the early, early days of IRC, but as IRC evolved, people began to want permanence. They wanted security and reassurance so that they could sleep at night without wondering if someone on the other side of the world was busy taking over their identity. As such, IRC services were created to resolve these issues.

An IRC service is a bot (short for robot) that is designed to perform specific tasks on an IRC network. As their name implies, they are primarily intended to serve and provide a more comfortable chatting experience. Networks tend to run multiple services, each with their own specific tasks and purposes in mind. Services typically have a public interface that allows users to communicate with them, generally over private messages.

freenode operates the Atheme IRC services package, a popular and widely used services package. Because it is open source, there have been numerous forks of the software, and it is free to use and install. freenode operates six network services: alis, ChanServ, MemoServ, NickServ, SaslServ, and OperServ.

alis
alis is an IRC service designed to help users find and search for channels with more flexibility than the  command. It is particularly useful on large networks with thousands of channels.

To use alis, type in. alis will search existing channel names that match your search query. For example, if I wanted to search for a channel about horses, I would type in, which might bring up:

Returning maximum of 60 channel names matching '*horse*' End of output
 * 1) horse                69 :Welcome to #horse, where we talk about horses all day long! | Grooming tips - http://www.example.com/
 * 2) horsecare            15 :Like horses? You've come to the right place! Here we discuss horses and how to care for them. | Visit our website at http://www.example.com/!
 * 3) horsepower           8 :Don't you just love the smell of grease in the morning?

The column on the left displays the name of the channel. The column in the middle displays the number of users in the channel. The column on the right displays the channel topic (if set).

You can also further customize your search by using the following parameters:

-min : minimum users in channel -max : maximum users in channel -skip : skip first  matches -show [m][t]: show modes/topicsetter -mode <+|-|=> : modes set/unset/equal -topic : topic matches pattern

These parameters are added after your search query. For example, to set the maximum users in channel parameter to 60, type.

alis will not display channels that have channel mode +s (secret); these channels will not normally show up in /whois or /list either.

ChanServ
ChanServ, short for channel services is an IRC service that, well, services channels. More specifically, it is designed to help maintain permanence in a channel and guards against unauthorized users gaining access to ops. It also allows for a hierarchy of user privileges.

By default, IRC channels are volatile; channel operator status is automatically given to the first user who joins an empty channel, even if the channel was used previously. That user would be free to give ops to any other user as they wished; however, ops on IRC are all created equal — by giving someone else ops, you are essentially giving them the ability to kick and ban you. As such, giving ops to another user was a risky business, but it had to be done, for if a channel lost all ops, it would be "opless", meaning that nobody could acquire channel operator status to deal with any channel issues. The only solution was to convince everybody to leave and allow a trusted user to recreate the channel. When an unauthorized user acquires ops, it is known as a "channel takeover".

ChanServ has largely eliminated the problem of takeovers by allowing channels to be registered, so that a new user cannot simply take over the channel by waiting for it to empty and then being the first to rejoin. ChanServ can be used by channel owners to control who gets ops, and can be used to regain control of the channel even if a malicious user banned the owner. ChanServ also offers a number of features that allow for hierarchies, which means that not all channel operators are created equal, and thus some chanops have more permissions than others.

There's a lot to ChanServ, so we won't go into every detail here. We'll cover some of the more basic commands here:

Checking channel registration
You can check to see if a channel is registered by using the  command. To use it, simply type. For example,  will display channel registration information for the   channel.

If a channel is not registered, ChanServ will say just that. It is possible for a channel to exist and not be registered, and it is possible for a channel to not exist and be registered.

Registering a channel
To register a channel, you must first be logged into your NickServ account. Then, you must join the channel you want to register. If the channel doesn't exist, it will automatically be created, and you will be given chanop by the server.

You need to be opped in order to register the channel! If you remove your op flag, or if someone else removes it, you won't be able to register the channel! Thus, if you want to register a channel, it's best to do it as soon as possible, before something happens (such as you getting disconnected) and you lose op. This requirement also prevents people from registering unregistered channels that do exist. ChanServ's registration feature is done on a first come, first serve basis. If someone else registers the channel before you, it's up to them whether or not they decide to give you access!

Having said all that, to register a channel, type. For example,  will register the channel , provided I met all the required conditions.

Channel registration is tied to your NickServ account. Thus, in order to get access to a channel you registered, you need to log in to your NickServ account. This also means that, if you give someone else your NickServ password (Which you should not do!), you are basically giving them control over your channels!

Dropping a registered channel
You can drop a registered channel, provided you have the appropriate permissions. Once a channel is dropped, all information ChanServ has of that channel will be deleted and cannot be recovered. The command is. For example,  will unregister the channel. To prevent people from accidentally dropping their channels, ChanServ will send you a verification code. Send that code back to ChanServ to finish the process.

A dropped channel can be re-registered by anyone, provided they have ops in the channel.

Granting and removing ops or voice
If you have the appropriate permissions, you can use ChanServ to give yourself op and/or voice on the channel, and remove them whenever you'd like. Depending on your level of access, you can also use ChanServ to give op and voice to any other user in the channel.

Type in. For example,.
 * To grant yourself voice in a channel

Type in. For example,.
 * To remove voice from yourself in a channel

Type in. For example,.
 * To grant yourself op in a channel

If you're already opped, you can just use, or.
 * To remove op from yourself in a channel

To grant and/or remove op or voice from another user, use the same command and suffix the nickname of the user you want to give op or voice to after the channel name.

For example, if I wanted to give voice to John in the  channel, I would type.

You can also perform changes on multiple users at a time. For example, if I wanted to give ops to Joey, Mary, and DJ, instead of typing  three times, I could just type.

MemoServ
MemoServ is an IRC service that allows users to leave messages for people who are not currently online. When you leave a message with MemoServ, MemoServ will hold onto it until the user you want to talk to logs in to their NickServ account. MemoServ will then notify that user about your memo.

MemoServ is easy to use, but you can only use it to leave messages for registered users.

Leaving a message
To leave a message, simply type.

For example, if I wanted to leave a message for JohnnyDoe that read "You owe me rent; pay it or I'll pay you a visit", type:

Reading a message
When someone sends you a message via MemoServ, you'll see something like this:

-MemoServ- You have a new memo from JohnnyDoe (1). -MemoServ- To read it, type /msg MemoServ READ 1

MemoServ will explicitly tell you what command to use to read the memo you were sent. When you execute this command, MemoServ will show you the memo that was sent, along with the memo number (we'll explain that later), the sender, and the time and date they sent it.

-MemoServ- Memo 1 - Sent by JohnnyDoe, Jan 01 00:00:01 1970 -MemoServ- -- -MemoServ- You're a bad landlord! I won't pay my rent.

When you read a memo, MemoServ will tell the sender that you have read it. If they're not online when you read it, they will be sent a memo by MemoServ.

-MemoServ- k6ka has read your memo, which was sent at Jan 01 00:00:01 1970

Managing your inbox
MemoServ will not automatically delete memos that you've received. They are instead stored in your memo inbox, which you can view with.

-MemoServ- You have 2 memos (1 new) -MemoServ- -MemoServ- - 1 From JohnnyDoe Sent: Jan 01 00:00:01 1970 -MemoServ- - 2 From JanetteDoe Sent: Jan 02 00:00:01 1970 [unread]

Every memo is assigned a number, which is displayed on the left. When you want to read or delete a memo, you have to specify the memo number. For example, to read that unread memo from JanetteDoe, type:

And then you will be able to see her memo:

-MemoServ- Memo 1 - Sent by JanetteDoe, Jan 02 00:00:01 1970 -MemoServ- -- -MemoServ- Stop bothering my brother to pay his rent! You're a terrible landlord who hates his tenants!

You can read a memo that you've already read as well, so long as you provide the correct memo number.

Your memo inbox can only hold about 50 messages. If you're starting to reach that limit, you may want to delete some of them. See the section below for details.

Deleting a message
To delete a memo, type. Alternatively, you can use the alias "del" to save yourself from typing three extra characters:.

Let's say I want to delete JohnnyDoe's snarky sass. To delete the memo, I must type, where 1 is the memo number. Once you delete a memo, it's gone forever; you cannot get it back!

The memo numbers for all subsequent memos will change when you delete a memo. In this case, since I deleted memo 1, memo 2 will change its memo number to 1 in order to fill in the vacancy. If I had a memo 3, that'll become memo 2, and so on. When in doubt, just do  again to make sure you don't wind up deleting the wrong memo.

You can also quickly delete memos that you've already read with, or wipe your inbox clean with.

Blocking messages
If someone is sending you spam messages through MemoServ, you can use the  command. To do this, type:

You can view the users you've ignore with. You can have up to 40 users on your ignore list. To unignore a user, type. To clear your ignore list, type.

This command will only block memos from a specific user. If you want to disable memos entirely for your account, type in.

SaslServ
SaslServ is a service that authenticates clients who log in via SASL. It has no public interface, and thus no commands.

OperServ
OperServ, short for operator service, is a service that assists IRC operators in managing the network. OperServ can be used to manage AKILLs ("automatic kills" that automatically disconnect malicious users when they connect), find clones (users that maintain multiple connections simultaneously to the network), control services themselves (such as restarting them or shutting them down), and other tasks.

OperServ can only be used by IRC operators.