Naima
From KneeQuickie
Naima is a bot written in Perl, by MUBA. Naima resides in various IRC channels on irc.sorcery.net.
Contents |
Commands
Naima responds to a number of commands.
- !chat subject - Naima will try to say something (non)sensical about the given subject, or about something random if no subject is provided. See also #Chatting.
- !chup channel - Naima will update user information about the people on the given channel or the current channel if no channel is given. Sometimes Naima is a bit slow on catching up with joins/leaves/usermode changes, and with this command you tell her to get up to date right now.
- !commands - See the commands that are available to you.
- !floodcount - See the floodcount list. This is a list Naima maintains to decide how floody users are. See also #Floodcount.
- !help command - See a short explanation for the given command. Do not include the initial exclamation mark in the command name.
- !ignored - See the list of people Naima currently ignores. Doesn't work if you are on the list, of course... See also #Floodcount.
- !naima action - Forces Naima to do a /me action.
- !onchan channel - See a list of users on the given channel. Naima must be in that channel for this command to work.
- !roll expression - Throw dice! See the full documentation here.
- !rps opponent best-of-so-many-rounds - Play Rock-Paper-Scissors with somebody on the channel. The best-of-so-many-rounds argument is optional and defaults to 1. Naima herself can be the opponent, if you want. Invoke the command and just follow the instructions.
- !sp word - Check the spelling of the given word.
- !spsug word - See alternative spelling suggestions of a given word.
Chatting
Naima watches the conversations that are going on in the various channels. She analyses how sentences are built, by keeping track of what word can come after what other two words. For example, from the sentence "the quick brown fox jumps over the lazy dog", Naima learns that the word "brown" can come after "the quick", and that "fox" can come after "quick brown", and that "jumps" can come after "brown fox", et cetera.
In time she learns which combinations occur a lot and which ones occur only occasionally. When Naima tries to say something herself, she randomly picks words that can come after each other, and the combinations that happen more often are more likely to be picked.
These words are called "nodes", and connections she learns are called "links".
To prevent her database from growing too big, every once in a while Naima "forgets" nodes that don't seem so important. When a node gets deleted, the associated link automatically disappears too. Nodes that become unreachable (because there are no links to them anymore, or because they don't have links of themselves anymore) are removed too.
Floodcount
The floodcount list is a mechanism Naima uses to decide which users to ignore. On channels where Naima has (h)op status, she also uses it to kick and/or tempban people.
Every time you say something (either a normal message or a /me emotion) or join a channel, your floodcount rises a bit. If you say two or more things subsequently without anyone else talking first, your floodcount rises a bit more than normal. And if you say the same thing twice without saying something else inbetween, your floodcouunt rises even more.
If you join a channel, leave it again (either because you just leave that channel or because you lose/close connection), and rejoin, your floodcount rises quite heavily. If you rejoin subsequently (bouncing), your floodcount rises more each time.
Over time, if you are silent and stop bouncing, your floodcount drops again.
When your floodcount reaches or exceeds 40, Naima ignores you from that moment on until your floodcount is low enough again. When she does so, she also stops kicking you from channels and removes you from the banlist again. This usually takes 30 - 60 minutes.
Since the floodcount is lost after a #Scheduled reload, Naima no longer ignores and kicks you after one, and after such a reload she removes the bans she put on people.
Scheduled reload
Naima keeps track of various things, most of which are supposed to be forgotten after a while. But for a yet unknown reason, this doesn't always work properly, causing the bot to use more and more memory as she runs. To flush all that useless data, Naima stops running and starts a new instance of herself every six hours.
Quotes
Naima can blurt out just about anything. Here are some of her more profound blurtings:
- He had always been in love with the wrong way
- the thing about being interested in her name is the hardest part
- the way of the word of the night
- if you look like the other one with the other day i was wondering why you thought we were talking about something
Categories: Stubs | IRC

