home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
os2bot.zip
/
BOT.DOC
< prev
next >
Wrap
Text File
|
1997-07-20
|
33KB
|
816 lines
OS2Bot Administrator Guide
Version 2.76
OS2Bot provides several services for the #os2 channel. Its primary
features include auto-oping authorized channel operators, flood
protection, and data base updates and queries.
/*********************************************************************/
/* The following commands can be executed by any user (level 0) */
/*********************************************************************/
!ASK keyword
The !ASK command queries the bot database for the entry with a
name of "keyword". If the entry is found it is displayed.
!CHOP nickmask
The !CHOP command displays the last time a given chan-op joined
the channel. The "nickmask" is the nickname of the chan-op. The
"nickmask" may contain wildcards. Therefore a "nickmask" of *
will display all chan-ops registered with OS2Bot.
!DCC LIST | file.name
The !DCC command displays or sends via DCC a file made available
via the bot's services. If "LIST" is specified a list of files
available to the user is displayed. If "file.name" is specified
the requested file will be sent to the user by executing a
DCC SEND command to the user.
!FIND text
The !FIND command will locate the first 10 database records which
contain the string "text" within their entries and display those
entries to the user. This command is restricted to private message
to the bot.
!HELP [command]
The !HELP command displays the syntax of the available commands
to the user. Optionally the specific command name may be provided
to obtain the syntax of just that command.
!LIST wildcard
The !LIST command displays the keywords assigned in the database.
A wildcard matching parameter must be specified such as a* to
display all keywords beginning with "a" or "A". A value of "*"
is not valid. This command must be sent to the bot via a /MSG.
!FTP site text
The !FTP command displays up to 10 records from the specified
site's index00 file which contains the specified text.
!PURPOSE
Displays the channel purpose if one is set.
!RULE [n]
Displays the channel rules is set. If you do not specify the
[n] parameter, all rules are displayed. If [n] is specified,
only that rule is displayed. n is an integer value beginning
with 1 up to the highest rule number.
!SET keyword text
This command sets a new entry in the database. "keyword" is the
keyword to be assigned to the entry. "text" is the text of the
new entry. The entry will have the nickname of the user doing
the !SET appended to the end of the entry. If the database is
"locked" via the !LOCK command, then only chan-ops can do !SET.
If the the lock is set to "all" all !sets are blocked.
Note that although normally all users can do !SET, they cannot
erase entries as the !ERASE command is resticted to chan-ops. In
addition, !SET will not replace an existing entry. Existing
entries must be erased using the !ERASE command before new text
can be assigned to a keyword.
/*********************************************************************/
/* The following commands can be executed by level 100 chan-ops */
/*********************************************************************/
!DCC
The !DCC command without operands displays active DCC sessions
if the usr is level 100 or above.
!ERASE keyword
The !ERASE command deletes the record with a key of "keyword"
from the database.
!FTP [hits] site text
The !FTP command displays up to 10 records from the specified
site's index00 file which contains the specified text.
Chanops defined to the bot may specify the number of hits to be
displayed. The minimum is 1, maximum is 100, default is 10.
!IGNORE [-]user@host.mask [minutes]
Tell the bot to ignore the specified user@host for the time
specified. If [-] is specified then a active ignore will be
removed. If [minutes] is not specified, the default ignore time
is 15 minutes.
If no parameters are specified on the IGNORE command the current
ignore list is displayed.
!LOCK on | off | all
Normally all users are permitted to execute !SET commands. However,
if the Lock mode is set "on" only chan-ops are permitted to do
!SET's. If the mode is set to "all" sets are blocked for all users.
!OP [autoop [on|off]]
!OP [nick1 nick2 ...]
When the !OP command is executed without any parameters it is
treated as a request for chan-op status. In this case an authorized
user is given ops on the channel. The command is usually ignored
when executed by a non-authorized user. However, see the !OPKICK
command to kick users begging for ops.
When the first parameter in the command is "autoop" then the
command is used to set the chan-ops auto-op mode. If the auto-op
mode is "off" the user will not be automatically oped when they
join the channel. If the auto-op value is "on" the user will be
oped when they join the channel provided that 1) the general
auto-op mode is set on (See the !AUTOOP command) and 2) the user
does not have a password set.
If any other parameter besides "autoop" is specified it is treated
as a list of nicknames separated by spaces. Each name is validity
checked and the user given ops until the end of the list is
found or a invalid nickname is encountered.
!PASS password [newpassword]
The !PASS command is used to send, add, change or delete a chan-op
user password. Only the password of the sender of this command may
be maintained. The command must always be sent to the bot via /MSG.
If you should accidentally enter the command in the open channel
you have lost integrity of your password and should change it
immediately.
A chan-op would set and use a password if and when 1) passwords
should be required by policy due to a security risk or 2) if the
chan-op determines that they are subceptable to being impersonated
by a malicious user hacking their user@host and obtaining access
to the bot and chan-op priviledges. Note that if this is the case
you must also set a password with the W bot also to maintain
integrity from all fronts.
Setting a user password will automatically disable the auto-op
features. Once a password is established, the password must be
sent to the bot before any restricted bot commands can be used.
If the user has auto-op set for their entry, they will be
automatically op'd when they successfully authenticate with
the !PASS command.
To set a password initially enter /MSG OS2BOT !PASS * password
To send your password to the bot enter /MSG OS2BOT !PASS password
To change your password enter /MSG OS2BOT !PASS password newpassword
To delete your password enter /MSG OS2BOT !PASS password *
!QUIET on | off | ops
Several !commands can be executed on the open channel by any
user. However, if Quiet mode is set "on" then normal users must
/MSG the bot for !commands. Regardless of the Quiet mode,
chan-ops can always enter the command as public messages and have
them displayed for all users.
If Quiet Mode is set to "ops" then all commands to the bot
are ignored unless they come from a chanop.
!STATUS
The !STATUS command displays the various mode setting of the bot.
The command may be abbreviated as !STAT.
/*********************************************************************/
/* The following commands can be executed by level 200 chan-ops */
/*********************************************************************/
!AUTOOP on | off
This command sets the global auto-op flag. If AutoOp is "on" then
the bot will automatically op authorized users when they join
the channel provided that 1) They have thier user level auto-op
setting on (see the !OP command) and 2) That they do not have a
individual password set (see the !PASS command). If AutoOp is
"off" automatic oping is disabled regardless of the other settings.
!FLOOD
!FLOOD BOT msgs secs ignoresecs
!FLOOD PUB msgs secs
!FLOOD MASS cmds secs ignoresecs
!FLOOD PACE bytes msgs secs
This command displays and sets the various flood protection
parameters. If no parameters are specified, the current values
are displayed and an idication given if mass flood protection
is in effect at the current time.
If the BOT parameter is specified the bot flood values are set.
If "msgs" private messages are received by the bot in the
interval of "secs" seconds the abusing user will be ignored by
the bot. Once a abusing user is ignored, the bot will accept no
more commands from that user for "ignoresecs" seconds.
If the PUB parameter is specified the public flood values are
set. If the bot detects that a user sends "msgs" messages to the
channel within "secs" seconds the user will be kicked off the
channel by the bot.
If the MASS parameter is specified the mass flood values are set.
If "cmds" bot commands or CTCP commands are received by the bot
within "secs" seconds from any source, mass flood protection is
activated for "ignoresecs" seconds. While mass flood protection
is in effect the bot will ignore all bot commands and CTCP commands
from all sources except channel operators defined to the bot.
Pacing values are set using the PACE keyword and related values.
The bot will pace output messages so that no more than
"bytes" bytes and / or "msgs" messages will be transmitted
within "secs" seconds time. This is used to prevent the bot from
being flooded off the server. For flood protection to be active
"bytes" and either "msgs" or "secs" or both "msgs" and "secs"
must be non-zero.
Channel operators defined to the bot are not affected by flood
protection controls.
!OPKICK [off] [text]
If a visitor asks for ops using the !OP command and that user
is not registered with the bot to have chan-ops, the !OP request
will normally be quietly ignored. However, if the OpKick mode
is set, the unauthorized user will be kicked from the channel
with a reason of "text".
To set OpKick on simply enter !OPKICK kick text.
To turn OpKick mode off enter !OPKICK off.
To display the text currently set for OpKick enter !OPKICK
!SAY text
The !SAY command is used to tell the bot to say something on the
open channel. Obviously the command must be executed via /MSG or
it loses it's usefullness.
WARNING: Since this command allows for entering raw text to IRC
the bot should always be given a low access level in the W/X
bot access list. If a high level is given and the bot is
compromised then the W/X bot will likewise be compromised.
Examples: /MSG OS2BOT !SAY Hello joe!
!SNDKICK [off] [text]
If this option is set and a user does a CTCP SOUND to the channel
they will be kicked with the text as provided.
To set SndKick on simply enter !SndKICK kick text.
To turn SndKick mode off enter !SNDKICK OFF.
To display the text currently set for SndKick enter !SNDKICK
!TOPIC [off | text]
A default topic can be maintained by the bot by using the !TOPIC
command. If a default topic is set the bot will monitor the
topic from time to time and if it discovers that no topic is
set it will set the default topic. If any topic is already set
the bot leaves the topic as is.
To set a default topic enter !TOPICK default topic text
To turn the topic feature off enter !TOPICK OFF.
To display the default topic enter !TOPIC
/*********************************************************************/
/* The following commands can be executed by level 300 chan-ops */
/*********************************************************************/
Only 300+ chan-ops can execute bot commands while not joined to
the channel.
!INVITE channel
Ask the bot to invite us to join the specified channel. Obviously
the bot must be on that channel and have ops there. This is useful
if the the channel has been set +i and access is desired.
!JOIN
Ask the bot to join the channel. Since the bot is not on the
channel when this command would be executed, it must be done via
a /MSG command.
!KILL [die]
The /KILL command terminates the bot. Once it is terminated it
cannot be remotely restarted. This command would be used only
at times where the bot is causing a disruption of some sort and
must be terminated to eliminate the problem. The !KILL command
must be executed via a /MSG to the bot.
If the "die" parameter is specified, the bot terminates with a
return value of 1. Otherwise it terminates with a return value
of 0. This is useful in scripts that restart the bot.
!LEAVE
Ask the bot to leave the channel. You can later ask it to rejoin
using the !JOIN command.
!MODE [none|modeflags]
This command tells the bot to maintain the channelk mode. If no
parameters are specified the current mode being maintained is
displayed. If [modeflags] are specified, the mode specified by
those flags will be maintained. If [none] is specified then
this feature is disabled and the bot will not maintain any
specific channel mode. When activated, the channel mode is
checked and adjusted as needed every two minutes.
/*********************************************************************/
/* The following commands can be executed by level 400 chan-ops */
/*********************************************************************/
!CHOP nick DELETE
This version of the !CHOP command removes a user from the bot
access list. The "nick" is the nickname of the user to be removed.
You may not delete a user with an access level equal to or
greater than you own access level.
The command must be executed via /MSG.
!CHOP nick mask level flags
This version of the !CHOP command adds or modifies a user in the
bot access list. This command must be executed using /MSG.
The "nick" field is the nickname of the user to add
or modify. Multiple entries for a user may be added by changing
the "nick" entry slightly. The "nick" field is used only for
use in the !CHOP command and is not used to identify the user
when they join the channel.
The "mask" is the user@host mask for the user. i.e. *!*jbob@*.my.net
The "level" field is the access level for this user. i.e. 200
The "flag" field determines if the user should be auto-oped when
joining the channel. A value of "A" will cause the user to be
auto-oped. a value of "a" will disable auto-op for this user.
This field may be modified by the user via the !OP command.
If the nickname already exists, all fields except "nick" will be
replaced with their new values. If the nickname does not exist
it will be created.
To change the nick, first create the new entry using the new nick
name and then delete the old entry. The actual order only matters
in case you make an error on the create and need to refer to the
old entry again.
You may not add or modify a user giving them a access level equal
to or greater than you own access level.
!FLAG nick [flags] [PASS *|password]
The !FLAG command displays or changes a chan-ops flags. It can
also be used to set or remove the users password.
If no optional parameters are specified, the users flags are
displayed.
If PASS is specified the users password is set to "password" or
if the password is "*" the password is removed. The PASS parameter
may be specified with or without the [flags] field.
The supported flag values are shown below. An upper case value
sets the option on and a lower case value sets the option off.
A - Auto-op the user when they join the channel.
a - Do not auto-op the user.
P - The user must use a password.
p - Using a password is optional.
S - The user is suspended.
s - The user is not suspended.
It is important to verify that a user requesting that his
password be reset is indeed who he says he is! Make every effort
to identify him first. The user@host is NOT adequate for this
person because the potential for a hacked user@host is exactly
the situation where the password provides protection. E-Mail
to and from the requesting user is a better choice for validation.
It is suggested that you e-mail the user and await a reply from
then by e-mail before honoring any such reset request.
!LOG on | off
Turns channel logging on or off.
!PURPOSE text
Sets the channel purpose to "text".
!REDIR off | #channel text
The redirect feature is used to hold a second channel open and
send a message to that channel when someone joins it. It's
purpose is to redirect users joining a similar channel name to
the real channel. Only one channel can be redirected.
#channel is the name of the channel to be redirected.
"text" is the message text sent to the channel when someone
joins it.
Use the "off" keyword to set channel redirection off.
!RULE n text
Sets the specified channel rule. "n" should be an integer
beginning with "1" up to the highest rule to be set. The
value of "n" should be a consecutive number in the rule set.
!SAY text or /command
This is the same as the level 200 command except you can also
say /commands with it such as mode, etc.
WARNING: Since this command allows for entering raw text to IRC
the bot should always be given a low access level in the W/X
bot access list. If a high level is given and the bot is
compromised then the W/X bot will likewise be compromised.
Examples: /MSG OS2BOT !SAY Hello joe!
/MSG OS2BOT !SAY /KICK Joe Your being a lamer
!SETDCC filename DEL|level comments
This command is used to add, delete or alter a DCC record.
If "DEL" is specified the entry for "filename" is deleted.
If "filename" is specified the entry is updated or added as
appropriate. The "level" is the user level at which the user
of the !DCC command must have to list or DCC request the file.
"comments" are displayed when the user does a !DCC LIST provided
their user level is greater or equal to the level for the file.
Note that the file must reside in the bot's directory. The file
name must not contain any ":" or "\" characters or any DCC
requests will fail. This restriction is a security precaution
so that the bot cannot be used to obtain other files from the
machine where the bot executes.
/*********************************************************************/
/* The following commands can be executed by level 500 chan-ops */
/*********************************************************************/
!CFG add|del|list parms ...
The !CFG command is used to list, add or delete records from
the config file. If "list" is specified, all records matching
the parms will be listed.
The parms are as many parameters of the config record as
required to adequately indentify the records to be acted on.
Example: !cfg list chop agios
Note that only the config file is altered. No attempt to
dynamically adjust run parameters is made.
!KICK [Add|Del phrase]
The !KICK feature is used to kick a user if they enter the
specified key phrase publicly in the channel.
The list of active kick phrases may be displayed by entering
the !KICK command with no parameters.
To add a phrase to the kick list, enter /KICK ADD the phrase.
To remove a phrase from the list, enter /KICK DEL the phrase.
!PASSLVL [nnn]
The !PASSLVL command is use to force the use of user level
passwords by chan-ops whose access is above the specified
level. A Pass Level of 0 indicates that the feature is
disabled.
If no operands are specified the current Pass Level is displayed.
If a value is provided it must be numeric in the range of 100+
and the Pass Level is set to that value. Any chan-ops joining
whose access level is equal to or greater than the Pass Level
will then be required to establish a password if they have not
already done so, and use the password in order to execute
restricted bot commands.
/*********************************************************************/
/* Miscellaneous information. */
/*********************************************************************/
When terminating the bot using /quit /bye or /signoff you may specify
a parameter of "die". If "die" is specified the bot will terminate
with a return value of 1. Otherwise it will terminate with a value
or 0. This is useful in scripts that restart the bot.
/*********************************************************************/
/* Configuration control file records. */
/*********************************************************************/
The default config file name is bot.cfg. This may be overridden at
startup by specifying a command line option of /c=file.name.
Any line beginning with a space or / character is considered a comment
and is ignored.
All records are optional unless specifically stated otherwise. When
a record is omitted that option is considered disabled or off.
Many of these parameters can be changed with bot commands. When
they are changed online with bot commands the config file is updated
automatically.
/*********************************************************************/
/* Required configuration records */
/*********************************************************************/
SERVER servername port [passwd]
This record is required. The bot will terminate with an error if
this record is missing or it's syntax is invalid. It specifies
the IRC server to which the bot is to connect as well as the
desired port and, if required, the password for the server.
BOT nickname username realname
This record is required. The bot will terminate with an error if
this record is missing or it's syntax is invalid. This record
specifies the nickname, username and realname for the bot. The
real name may consist of multiple words.
/*********************************************************************/
/* Optional configuration records */
/*********************************************************************/
ALIAS equate tocmd Alias a command name
The Alias record is used to translate a specific word to a bot
command. For example, assume that the bot command character is
"!" and you want the word "calc" to be the same as if they entered
!ask, you would have an alias record of: ALIAS calc !ask
AUTOOP on | off
If this option is set on then chanops will be auto-oped when they
join provided that their Chop record flags are set to be auto-oped
and that PassLvl is not set at or below their user level. If this
option is set off then auto-oping will not occur regardless of
the other settings mentioned.
BOTLOG file,name maxsize
If this record is present the bot will maintain a internal log of
several items including all channel mode changes, all bot commands,
and the like. This internal log is written to the file "file.name".
Once the log file grows to a size greater than "maxsize" bytes it
is rewritten excluding the first 25% of the file. Therefore, no
maintenance is required for the file. The minimum value for
"maxsize" is 4096. If a smaller value is specified it will be
set to 4096.
CHAN channel Channel name
This record causes the bot to automatically join the specified
channel upon connection to the server. If not provided the bot
will simply connect to the server and not be joined to any channel.
CHOP nick u@h lvl flg jcnt date time *
This record defines the channel operators to the bot. These
records can be added, modified and deleted using the CHOP command.
Initially you will need one chop record defined for the master
user.
nick - The nickname normally used by the chanop. This is used
only for displaying and updating the chop records. The actual
nickname of the user does not matter regarding them using the
bot services.
u@h - This is the fully qualified nick!user@host.mask for the
user. Wildcards may be used in this field. This mask is used
to identify the specific user.
lvl - This is the user level assigned to the chanop. Advanced
services are available to higher level users. See the command
section regarding which commands are available to each level.
flg - This defines a number of flags for the user. If the flag
is upper case that feature is active. If the flag is lower case
that feature is disabled. Currently there are three flags:
A - Autoop the user when he joins the channel.
S - This chanop is suspended and cannot receive chanop services.
P - This chanop is required to set and use a password.
jcnt - This is the join count. The number of times the user has
joined the channel. You should set it to 0 initially. The bot
maintains this field automatically.
date time - These fields tell the date and time the user last
joined the channel. They are maintained automatically by the bot.
If you are adding records manually you should place "Never Joined"
in these fields.
* - The default password. You cannot edit this field directly.
You may set it using various commands to the bot. An * indicates
that no password is currently set. If you are manually editing
the chop record you should specify * here and update it later
with the Pass command.
An example of a chop record is found at the end of this section.
CMD @ The Bot command ID
This record specifies the command character for the bot. There
is no default so if it is not specified you will not be able to
enter bot commands. This may be desirable depending on how you
intend to use the bot. Note that all bot commands are prefixed
with this character. i.e. Ask would be !Ask if the command
character is defined to be !.
COMMAND command level pri|pub
Each bot command has a minimum user level associated with it.
A user with a level below that required is unable to use that
command. These levels are shown in the command section. In
addition, each command has a flag indicating whether the command
can be executed on the open channel or only by a /msg to the bot.
This record is used to override the default level and public/private
flag on a command by command basis. If a command is overridden then
both the level and public/private flag must be specified.
DBASE database
The dbase record tells the bot what the file name of the bot's
database is. If this record is not present then data base services
will fail. If you do not wish to provide database services you
should not include this record. It would also be a good idea to
disable the data base related commands by setting their access
levels higher than the highest defined user via the command
record.
DCC file.name level count comments
The DCC record specifies a file name which resides in the bots
directory which can be DCC'ed to a requesting user via the !FTP
command providing his access level is equal to or greater than
"level". The comments are displayed to the user when they do a
!DCC LIST command.
The "count" field is the download count for the file. It is
automatically updated by the bot. If you are editing this
record directly specify 0 for the count.
Note that the file must reside in the bot's directory. The file
name must not contain any ":" or "\" characters or any DCC
requests will fail. This restriction is a security precaution
so that the bot cannot be used to obtain other files from the
machine where the bot executes.
FPUB msgs secs Public flood values
FBOT msgs secs ignoresecs Bot flood values
FPACE bytes msgs secs Pacing values
FMASS cmds secs ignoresecs Mass flood values
These records establish the bots flood protection parameters.
See the FLOOD command for a detailed description.
JOINCMD command
This option is used to automatically execute a command when
the bot joins the channel. It can be used to get op's from W.
KICK phrase
This option is used to automatically kick a user from the
channel if they type the indicated word or phrase on the
open channel.
LOCK on | off | all
This record is used to restrict SET commands by users. If off,
all users may set entries in the database. If on, only chan-ops
defined to the bot may set. If all, nobody can set.
LOG on | off
This record turns channel logginf on or off.
MODE modeflags Channel mode to maintain
If this option is set then the bot will check the channel mode
every two minutes and adjust it so that the specified mode is
maintained. Additional mode flags are removed and missing mode
flags are added. e.g. MODE tn
OPKICK text Kick with text if ops begged
If this feature is specified then any user entering the !op
command who is not defined to the bot as a chanop will be kicked
from the channel with a comment of "text".
PASSLVL nnn Set Password Required level
Generally user level passwords are optional. A chanop may choose
to set one or not. However, if PASSLVL is set and the user has
a level equal to or greater than the pass level value, that user
must set and use a password in order to use the chanop level bot
commands.
QUIET on | off | ops Quiet mode
Normally the !ASK command can be executed on the open
channel by any user. However, if Quiet mode is set "on" then
normal users must /MSG the bot for !ASK commands. Regardless
of the Quiet mode, chan-ops can always enter the command as
public messages and have them displayed for all users.
If Quiet Mode is set to "ops" then all commands to the bot
are ignored unless they come from a chanop.
REDIR off | channel text Redirect Channel
This feature causes the bot to join an additional channel
and send the "channel text" to every user that joins that
channel. It is meant to be used to direct users to the real
channel if they might join a channel with a slightly different
name by mistake. Other bot commands are not valid on the
redirected channel.
SNDKICK text Kick with text if snd flood
If this option is set any user who executes a CTCP SOUND command
to the channel will be kicked off the channel with a comment
of "text".
TOPIC text Default topic text
This feature is used to set a defalut topic. Every so often
the bot will check to see if a topic is set. If no topic is
set then the topic defined as "text" will be set. It does not
reset a topic if one is found to be set that differs from the
default.
TRACE tracefile
Raw IRC message traffic can be written to a trace file. This
accumulates a lot of data in a short period of time and is
therefore not generally desirable. If however, you do desire
a trace you may set it with this config record or by using
the /t=file.name command line parameter.
/*********************************************************************/
/* Sample basic config file */
/*********************************************************************/
Server irc.server.net 6667
Bot BotNick BotUName The Pool Bot
Chan #ThePool
Cmd @
Dbase bot.db
joincmd /msg w@channels2.undernet.org pass botspw
purpose The pool is for swimming.
rule 1 [Rule 1] No shouting.
rule 2 [Rule 2] No running.
rule 3 [Rule 2] No jumping.
rule 4 [Rule 2] No diving in shallow water.
fpace 512 1 2
chop SuperUser *!*myuser@*.host.net 500 Asp 0 Never Joined *