You are currently viewing a snapshot of taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to, please file a bug.

God Module

This page will help you set up mozbot in a channel on an IRC server where a mozbot instance is running, so that mozbot stays in the channel to keep it op people who you want to give ops to.

Note that you can do this even if you are not the bot's administrator, although currently you do have to speak to them at one point.

Preliminary Setup

This section will set you up as a channel administrator.

First, invite the bot into your channel:

 /invite mozbot #channel
--- You're inviting mozbot to #channel (
--> mozbot ( has joined #channel

For this to work, you have to be an op in the channel, the bot admin has to have set the Admin module's allowInviting setting to 1 and if the channel is keyed, the key must be listed in the channelKeys hash (another Admin module variable).

If it doesn't work, get the bot admin to say:

 /msg mozbot join #channel

Next, get a user account in the bot (if you are the admin you already have one and can skip this step and the next one):

 /msg mozbot newuser username password password
*mozbot* New user 'username' added with password 'password' and no rights.

Now get the bot admin to promote you in your channel by getting them to send the bot the promote command:

 /msg mozbot promote username in #channel
*mozbot* User 'username' promoted to channel administrator status in channel '#channel'.

At this stage you should have channel admin status in your channel as far as the bot is concerned.

Adding Users

First, authenticate with the bot:

 /msg mozbot auth username password
*mozbot* Hi username!

Next, make sure the bot is opped, otherwise it can't op anyone itself:

 /mode #channel +o mozbot
--- IRCMonkey gives channel operator status to mozbot

Now it's time to add users to your list of people to autoop. They need to send the same commands you did to create an account:

 /msg mozbot newuser username password password
*mozbot* New user 'username' added with password 'password' and no rights.

You then add them to the autoop list by saying:

<IRCMonkey> mozbot: autoop username in #channel
   <mozbot> IRCMonkey: User 'username' added to the autoop list of channel '#channel'.

Now, when they authenticate with the bot, they will get opped:

 /msg mozbot auth username password
*mozbot* Hi username!
--- mozbot gives channel operator status to IRCMonkey2
<IRCMonkey2> thanks
    <mozbot> IRCMonkey2: np

Adding hostmasks

NOTE: This is discouraged. The authentication method (previous section) is a lot safer.

Some people prefer to get mozbot to op people based on their originating host, their username, or, even worse, their nick.

Using the host is suboptimal (host names can be spoofed). Using the username or nick is just plain stupid.

To add a mask, you use the add mask command.

Masks can be either regular expressions matched against the user@host string or hostmasks in the traditional IRC way.

Example masks are:

hostmask: *!*@*
regexp: .*
These match any nick, any username, and any hostname, you probably wouldn't want to use them because they would op everyone who comes into your channel.
hostmask: *!*
regexp: ^.*\@adsl-63-197-31-110\.dsl\.snfc21\.pacbell\.net$
Both of these match any user with a domain name of This is something that you would want to use because no matter what nick someone is using they will get oped. However, they must have a static IP address to do this.
regexp: ^.*\@adsl-63-197-31-[0-9]+\.dsl\.snfc21\.pacbell\.net$
This regexp will match a subset of Pacbell's users. It is a compromise between the odds that no-one with bad intentions will happen to have the same ISP in the same area as the user, and the convenience of autoopping.
hostmask: joeshmoe!*@*
Matches anyone with the nick joeshmoe who uses AOL. This is a good way of opping anyone who uses AOL and has brains.
hostmask: joeshmoe!joeiscool@*
Matches anyone with the brains to change their username.

Once you have constructed a mask you pass it to mozbot like this:

<IRCMonkey> mozbot: add mask mask in #channel
   <mozbot> IRCMonkey: Mask 'mask' added to the autoop list of channel '#channel'.

Now, when anyone matching that mask enters the channel, they will get opped:

--> IRCMonkey2 ( has joined #channel
--- mozbot gives channel operator status to IRCMonkey2

Other Commands

To get a list of who gets opped in a channel, use the ops command. (Note. Anyone can do that, so don't rely on the masks being secret. Security by obscurity is poor security indeed.)

<IRCMonkey> mozbot: ops in #channel
   <mozbot> IRCMonkey: #ui admins: username
   <mozbot> IRCMonkey: #ui ops: username
   <mozbot> IRCMonkey: #ui autoop masks: mask

The other commands available can be found through the online help of the bot.

Return to documentation index, main index.