Site Meter
[Applications]   [Classes]   [Commands]   [Downloads]   [Egghelp]   [Features]   [Help]   [Information]   [Links]   [News]   [Policies]   [Staff]

Issuing Commands

Levels of Access


Commands for:

Addon Features

Ban Tutorial

The BAN command is one of the most useful commands at your disposal. It allows you to control who you want in your channel, and more specifically, who you DON'T.

It is somtimes assumed that this command is nothing more than a short way of typing  /mode #channel +b. This tutorial aims to correct that misconception.


The BAN command is used for maintaining a record of bans on the bot for it to act upon when neccessary. How the bot reacts to the command depends on the situation. Sometimes it may ban the host and kick out any users who match the banmask, while other times it may simply report it has stored the ban, and take action at a later time.


The ban command has several arguments which may be used, but only one is mandatory. The usage of the command is as follows:

                   botnick ban victim bantime reason
or      /msg botnick ban #channel victim bantime reason

The last two fields are optional, and function independantly of each other. You may specify a bantime without neccessarily specifying a ban reason, or specify a reason leaving the bantime redundant.

Determining the victim

The victim of the ban command does not neccessarily need to be the nickname of a person on the channel. It can be anything in a usermask matching *!*@* as well.  Possible uses of the usermask system include: Ronald!*@* (to ban a particular nickname); *!*ksinv@* (to ban a specific ident); *!*@usr89.2.dsl.atlantic.net (to ban a host, regardless of nickname or ident, assuming the host remains static); and *!*@*.aol.com (to ban an entire ISP from the channel).

Sometimes you may not have time to work out a suitable mask, such as when the channel is being flooded. In this case, you may just specify a nickname of somebody on the channel and the bot will work out an appropriate mask and add it to the banlist.

Ban Time

Bans on the bot have a specific lifetime, after which the bot will forget them. How long each ban lasts is entirely up to you. When setting a bantime, it is important to remember the units available. These have been arranged in a way that is easy to understand. The types of ban available are perm bans (those which never expire) and timed bans. Timed bans begin with a number and end with one of the following letters (each corresponding to a different time frame):

m    minutes
h     hours
d     days
w     weeks
y     years

For example, to make a ban last one month, you would use a bantime of   4w  (4 weeks).

Infact, you can even combine these units to create a more precise ban duration. For example. if you wanted a ban to last one and a half hours, you could use a bantime of 1h30m. To the bot, it doesn't matter which order these units are presented in; you could just as easily have said 30m1h.

You can build up any bantime you like, provided it does not exceed 65 years, as this is the upper limit of the timed ban database.

For perm bans, the word "perm" is used in place of a bantime. This tells the bot that the ban is never to expire, and it is to enforce the ban whenever somebody matching it joins the channel.

Sticky Bans

On its default setting, the bot will remove bans from the channel's banlist a few hours after they were last set (don't worry, it will still keep them in memory). This is to avoid the channel banlist becoming full, which would prevent any more bans from being set. Naturally there are occassions when you don't want the ban to be stored in memory, and would prefer it to be active on channel all the time. This is particularly effective against spambots

Sticky bans are set the same as regular bans, with the addition of one character to the ban reason, which must start with the asterix character "*". This means, of course, that a ban reason must be specified. As a general rule of thumb, you should avoid setting too many sticky bans on the bot, as this decreases the efficiency of the channel's banlist.


In closing we will examine a few examples of how the ban command could be used.

  • A user has broken a rule about discussing religion in the channel.

  • botnick ban user 15m Your views are not welcome here!
  • A collection of floodbots are attacking the channel

  • botnick ban *!*@flood.host
  • The channel is troubled by a spambot with the ident mIRC

  • botnick ban *!*mIRC@*.* perm Spam Spam go away

©1998 - 2005 BotService