Ninjax Manual

This manual will tell you a lot of things about the bot. Anything from how to request the bot, how to use the redirect and ops control system for joti, what to do when the bot is misbehaving, and how the Bot Control Panel is working.

Contents

Modules and configuration

This chapter will give you a overview over most modules, what they do, and what we need to know when you request the bot, to make the config process as simple as possible.

The modules

Module Description
Ban list List the ban on all channels the bot are currently a part of
Broadcast Used to broadcast a message to all the channels the bot instance is currently in.
ChanManagement Used to open and close channels - primarily used in conjunction with UserRedirect module
ChannelIdleKicker Kicks (saparts) a user from a channel if he has been idling for more than a configured time limit.
ChannelLimiter Prevents a user from joining more than n channels from the same channel family (eg max 2 #englishXX channels). If a user tries to join more channels he is saparted.
KickListener Registers how many times a user has been kicked, from the channels the bot is currently on. Can put a notice to the configured oper channel if the number reaches a threshold - or can be queried per user or per channel at any time
MailChecker Periodically checks a pop3 or imap mailbox and puts a notice to the oper channel when ever it finds any unread mail.
MultiBan Apply a ban to all the channels the bot are currently in.
NickChanger Used to create a local blacklist of some nicks that are not apropriate for a country/region. If a user joins a channel using a blacklisted nick - or changes his/her nick to one on the blacklist then it’s changed to a random nick.
Opmanagement Used to get a overview of how may chanops and users there are in the different channels. Can also be used to find ops that are in more than n channels
SwearKick Analyzes all messages written to the channel, and if at least one of the words are on the configured black list the user is kicked (saparted) from the channel.
Trivia This is a module for creating a trivia/quiz channel. It writes a question, gives the users 4 answer options and waits 20 seconds to let the participants answer which they do by write the number for the answer hey believe is the right one. Periodically writes out a scoreboard to the channel
Uno A ninjax implentation of the popular card game. This module uses mjsalerno’s uno implementation
UserRedirect Used to distribute users from a main channel to a group of subchannels. Eg. when joining #english it first sees if there is room in #english01,#english02 etc. and puts the user in the first available channel. (uses SAPART+SAJOIN to move)

General information we need

Before even thinking about the modules, we will need to know a few things about you and your channel:

  • Your ScoutLink nick
  • Your email
  • Your team’s admin channel during your event (eg. #opers, #scanops, #joti-ops). This is a requirement for the bot to do it’s job properly. No channel, no bot.
  • A list of channels the bot will be in (can also be added in BCP later), eg. #english, #english01-30, #international, #trefoil, #espanol01-05

The next pages will contain info about all the modules, and what config options they have. Some of these will be set to something default by us if you don’t supply anything. If you’re wondering about anything, just as us, and we’ll help you out.

Configuration

Chanmanagement

The channel management module does exactly this: manage your channels.
During joti, you would tell it about all your channels, and help you opening or closing them, giving them the right flags and topics. In addition, you can have it register and drop all your temporary channels, also adding your tempops to said channels.
The module have the following config options:

Config option Description
chanmgmt.chanops Comma separated list over your operators. Will be added to chanserv in your channels, if you chose to use the channel init function
chanmgmt.founders Comma separated list over channel founders. Will be added to chanserv in your channels, if you chose to use the channel init function
chanmgmt.topic The topic you want set in your channels.
chanmgmt.voiceops Comma separated list over your voiceops. Will be added to chanserv in your channels, if you chose to use the channel init function

ChannelIdleKicker

Checks your channel to see if anyone is idle, then removes them from channel.

Config option Description
channelidlekicker.ignorechannels Comma separated list over channels ignored by the idle kicker (e.g #opers, #joti-ops)
channelidlekicker.interval Interval between the idle sweeps in minutes. 5 minutes is a good interval.
channelidlekicker.kickmessage Message the users will recieve when removed. Should include something about the idle rules and where to find them.
channelidlekicker.maxidle Maximum idle time in minutes

ChannelLimiter

The channel limiter module lets you configure a maximum of channels per channel family a user can be in. E.g only two #englishXX at a time.

Config option Description
chanlimit.chanfamilies List of channel families (channels with redirection on them). E.g #english, #international, #youth
chanlimit.maxchans Maximum number of channels a user can be in per channel family. Earlier years, this has been set to 3.

OpManagement

This module helps you keeping track of which of your channels have enough ops and how many users are in them. This info can be viewed in two ways: through messages in irc, or the recommended way - in the Botteam Control Panel. More on this in the usage chapter.

Config option Description
opsmgr.autointerval Interval for automatic check and statusmessage to your op channel. Set to 0 if disabled.
opsmgr.automoderate If set to TRUE, bot will set channels with no ops to +m (moderated), so no users can chat. Will set -m when a op has joined.
opsmgr.nocount Channels in this list will not be checked for ops.

SwearKick

Self explanatory module. Kicks users that swear from channels.

Config option Description
swearfilter.badword Comma separated list of swearwords to look for. Handles wildcards. If you’re not sure, Botteam has a good english example list.
swearfilter.exemptchannel Channels to be excempt from the swearfilter - eg. #opers

UserRedirect

This is THE module for joti. Moves all users joining a channel (eg #english) to one of several subchannels (#englishXX).

Config optionDescription
userredirect.channel This is the way of telling the bot how to redirect the users, using the following syntax:
<source channel>::<target channel>::<ser limit>::<number of channels>
eg
#english::#english::80::30
Redirect users joining #english, to subchannels named #englishXX, limited at 80 users per channel, and a total of 30 channels.
userredirect.mustdirect Decides behaviour whenn all target channels are full, and there's no room for ordinary redirection.
  • If mustredirect is false (default) then the new user is left in source/main channel.
  • If true, the user are redirected to the one open channel with fewest users (even though this will go beyond ordinary user limit)
userredirect.strategy Decides how user should be distributed to available channels:
  • First: uses first available channel (when enummerated from low to high numbers). This is the old and default method. This will try to keep the first channels are at maximum users.
  • Least: uses the open channel with least number of users in it
  • Random: take any random channel thats open and has room for more users.

Everyday ircOP usage

This chapter will include info for the ircops or chanops operating the bots during everyday JOTI-use, eg Oper in charge in #english. All commands are typed in a channel the bot are present in, preferrably the oper channel of your team. All commands start with ! then the command A full list of commands, what they do, and their syntax can be found here.

Opening and closing a single channel

Opening and closing a single channels are done by the following commands:

!<bot-nick> openchan <channel>
!<bot-nick> closechan <channel>

Examples:

19:35 < zleppy> !bot-indo copenchan #indonesian09
19:35 <@bot-indo> zleppy: OpenChan ok
19:37 < zleppy> !bot-indo closechan #indonesian09
19:37 <@bot-indo> zleppy: CloseChan ok

Closing a range of channels

You can also close a range of channels, for example if your bot was restarted (it always starts up with all channels open) using

<bot-nick> closemultichans <#channelgroup> <from> <to>

Example:

19:36 < zleppy> !bot-indo closemultichans #indonesian 04 20
19:36 <@bot-indo> zleppy: CloseMultipleChannels done

The example above would close channels #indonesian04 to #indonesian20

Start and stop redirection for a channel group

If you at some point would like to prevent your bot from redirecting users from one or more channel groups you use

!<bot-nick> redirect enable/disable <channel>

Example:

10:08 <BMA_DK> !bot-scan redirect enable #scandinavia
10:08 <bot-scan> BMA_DK: Please note, I have enabled redirection on #scandinavia.
18:22 <Sorkerer> !bot-scan redirect disable #scandinavia
18:22 <bot-scan> Sorkerer: Please note, I have disabled redirection on #scandinavia.

Disable the idlekicker for your bot

At some times, for example night time when things are slower, you might want to disable the idle kicking function of your bot. That is done simply by the command

!<bot-nick> idlekick enable|disable|status

Example:

00:33 <Kold> !bot-scan idlekick status
00:33 <bot-scan> Kold: Idlekick is enabled

00:33 <Kold> !bot-scan idlekick enable
00:33 <bot-scan> Kold: Idlekick is enabled

00:33 <Kold> !bot-scan idlekick disable
00:33 <bot-scan> Kold: Idlekick is disabled

Ops management

There are a few commands attached to the ops management module, but the preferred way to use the module, is by visiting the Bot Control Panel, selecting your bot in the list, and go to the page named Status: Opers.
This will show a neat table with all your open channels, their channel modes, how many operators they have, how many voiceops (helpers), how many users, and which operators are there. This page is automatically updated, but only a few times a minute, so changes won’t be visible instantaneously.

What do I do when my bot restarts and start acting strangely?

Sometimes, your bot will restart. That’s just something that’s gonna happen, either from servers crashing, connections breaking, or simply that the bot team have updated the code, and need to get it online to fix bugs. This causes the bot to “reset” to default operating modes when rejoining. The most noticeable thing for everyday users is that it will assume all channels to be open, and with redirection enabled. Your fix is simply closing all unused channels with closechan or closemultichans, and disabling redirection for whatever channels you don’t need with the redirect command.

Advanced usage and things for coordinators

Init channels for JOTI

If you are using this module, you can make the bot initialize your temporary channels for you. This means it will join every channel, register it with chanserv, set the topic you defined in config, and add all your operators and voiceops (helpers) to chanserv.
After joti, it can also help remove the channels for you.
To do this, simply use the command

<!bot-nick> initchans

After JOTI (or other events), simply undo this with the other command

<!bot nick> reverseinitchans

This will drop any channels the bot is in, ending with a number (#english01-30, #espanol01-15, etc)

Channel management - move users

The bot has a command for moving groups of users from one channel to another. This can come in handy if you need to empty a channel, or if the redirector gets hung up, and you want to empty your hub channel. It has also successfully been used to move users from one subchannel to another, so that the less busy ones can peacefully be closed.
This is done with

<!bot-nick> moveusers <source channel> <target channel> [number of users]

The number of users is optional. If specified, it will move that number of users from A to B. If not specified, all users in the channel will be moved.

00:33 <Kold> !bot-scan moveusers #scandinavia05 #scandinavia04 15

This will move 15 users from #scandiavia05 to #scandinavia04

Using the nick changer module

The nick changer module is a nice alternative to having techteam block the nick through services.
When you add a nick to the module, the bot will look for any user with this nick, and change it to a random guest-nick. This will only work in the channels this bot is in.

<!bot-nick> nickchanger add|remove <nick>

As you see, this command takes both add and remove arguments. Target nick HAS to be supplied as well.

[21:29:49] <zleppy> !bot-scan nickchanger add jagermeister
[21:29:49] <@bot-scan> zleppy: NickChanger add: ok

To remove a nick from the list, simply use the same command, but with remove instead of add.

Broadcast messages

Bot broadcast will send a message to all channels the bot has joined. This helps you message all your users, without bugging the ones in other channel groups (ie so that #english users won’t have to try to read the global messages from #indonesian). Messages will be sent to the channels, and visible in chat.
Simply done using

<!bot-nick> wall <message>

Example:

[13:21] <Darren> !bot-en wall Test your knowledge with our quiz! Join our trivia channel: /join #english-trivia
[13:21] <~bot-en> *** BroadCast by Darren:Test your knowledge with our quiz! Join our trivia channel: /join #english-trivia

Multibans

Multibans let you ban a user (or more) from all the bot’s channels. Instead of glining them from the whole network, you can now keep them out of the areas you are responsible for.
Can also be time limited, but this is not required.

<!bot-nick> multiban <add|remove> <hostmask> [minutes]

Gline helper

In order to make it easier to set a gline -and to help prevent banning too many users, one could use the gline helper instead.

First you create a gline request with the IP you want banned:

!<bot-nick> gline ban <ip> <duration> <reason>

Example:

!bot-test gline ban 192.168.1.2 1d Please behave properly

This will create a request and ask the IRC servers how many users would be affected, which will be presented back to you:

hoerup: Request created with ID 31f47fb6-285c-4049-8f33-62226ba7c729
hoerup: gline: Got user data for 192.168.1.2
hoerup: * Gline will remove 6 users
hoerup: * hereof 1 operators: hoerup

When ever you need to refer to this particular request you need to use the Gline request ID from the output, in this example 31f47fb6-285c-4049-8f33-62226ba7c729

Now you will need to either accept or cancel the request: preferable get a fellow ircOP to do it in order to get a second opinion. If you hand it over to another person, then said person can inspect the gline request with

!<bot-nick> gline status <requestID>

exsample:

!<bot-test> gline status 31f47fb6-285c-4049-8f33-62226ba7c729

In order to accept it and set the gline, use:

!<bot-nick> gline accept <requestID>

example:

!<bot-test> gline accept 31f47fb6-285c-4049-8f33-62226ba7c729

This will now create the G-line.

If you instead don’t want to use the request, then use the cancel:

!<bot-nick> gline cancel <requestID>

Redirection sweep, status, disableall

Sometimes the redirector gets hung up, or something might be cause the users not to be redirected. At those times, the following commands can be of help.

<!bot-nick> redirect sweep

This forces the bot to do a sweep of your hub channel, redirecting all users stuck in there to the appropriate subchannel.

<!bot-nick> redirect statusall

Gives you an overview of which channel groups has redirection enabled or disabled.

<!bot-nick> redirect enableall/disableall

This will enable or disable redirection for all your channels. This can come in handy if the bot restarts, and you have closed down channels ie during night time with less activity, and only wish to use your hub channels for chat.