Version 1.00 of majus's mIRCBot

This mIRCBot will only work properly with version 3.42 of mirc.
If you don't have this version then get it before trying to use this bot!
You can get it from my fileserver, or join #mirc and they will help you.

[PREFACE]:

Hello, I'm majus. I've spent many a hours creating this bot, and testing
it as much as possible.  If you use this bot as-is and have any problems
with it, I will do my best to help you fix the problem.  If you add this
or any part of it to a bot of your own, I may need you to send me a copy
of your .ini file in order to help you;  but keep in mind that I don't 
give any guarantees.  If the bot is not doing something that you want it
to do, then please let me know and I'll consider adding any features
I feel are important.  However, this is just a mIRCBot and can't compare
to a bot programmed in C or something;  all things are not possible!!!
You are more than welcome to add anything you wish to this bot or delete
any part of it that you do not wish to use. In my opinion, the only other
mIRCBot that can even compare to this one is _Shorty's claybearbot;  _Shorty
is mentioned more in the credits section of this file.  I've only tested 
this mIRCBot on a single channel, but I see no reason why it can't be used
on multiple channels.  However, it was designed to be the starter of a channel;
so putting it on a channel where people are already joined could produce some
minor problems.  I have fixed part of this problem.  The bot will now add all
default level users' nicks to a level above the default when the user says
anything in the channel;  this does NOT affect the bot's effectiveness that I
know of, except that it may keep it busy for a while on a busy channel until
it builds the user list.  The only other problem that may occur if this bot is 
used on multiple channels is that it may occasionally not recognize a friend. 
However, this is a minor problem and will probably only affect your friends to
a very small degree.  The bot will always recognize default users by adding their
nick to a level above the default when they join the channel or the next time
they say anything in the channel.  The bot will recognize your friends when 
they join the channel only.  So if they are in the channel before the bot
joins, then they must leave and rejoin the channel for the bot to recognize
them properly or they can msg the bot with any text to get recognized;  an
alternative to this is that you can add their nicks manually.  I'll explain
how adding nicks manually can be easily done by using the addons included
in this zipfile in the addons.txt. Well that's it for the preface.  
I hope this mIRCBot will be helpful to you and that you have problem free
channels with it's use.  Now on to the setup.

[SETUP]:

First thing you need to do is to extract the MIRCBOT.ZIP file to your root
directory ( C:\ ) using the -d parameter with pkunzip or the use directory
names option with winzip.  If you extract this zipfile in this manner, the
zip will automatically create the following directories.

    C:\MIRCBOT
    C:\MIRCBOT\FRIENDS
    C:\MIRCBOT\FRIENDS\DEFAULT
    C:\MIRCBOT\UPLOADS

It will put the following files in the C:\MIRCBOT directory:

MIRCBOT.INI
FRIENDS.TXT
DEFAULT.TXT
README.TXT (this file)
ADDONS.TXT  

It will put a HELP.TXT file in both of the following directories:
(this is the exact same file)

C:\MIRCBOT\FRIENDS
and 
C:\MIRCBOT\FRIENDS\DEFAULT 

It will put the READTHIS.TXT file in the C:\MIRCBOT\UPLOADS directory.

*Note:  If you do not use this method to extract this zip file, then 
        you will need to make these directories and install the files
        manually.

*Note:  If you set up this bot with directories other than the one's mentioned
        above then you will need to edit the MIRCBOT.INI file in order for
        all of it to work correctly.  (See the [EXTRA NOTES] section)

After these directories and files are set up correctly, then follow these
steps:
 
1.  Make a copy of your MIRC.EXE file named MIRCBOT.EXE and put it in the
    C:\MIRCBOT directory.  The easiest way to do this is to open your File
    Manager, go to the directory containing the MIRC.EXE file and highlight
    it with one click of the left mouse button on the filename.  After it is
    highlighted, click on File, then click on Copy, then type
    C:\MIRCBOT\MIRCBOT.EXE and click on OK.

2.  Now you need to set the MIRCBOT.EXE file up as an icon in your Program
    Manager.  Follow these steps to do it:

    a.  Open the Group that you wish to place the icon in.  Click on File,
        then click on New and make sure that Program Item is selected, then
        click on OK.

    b.  In the Description field type MIRCBOT then press the TAB key and type

        C:\MIRCBOT\MIRCBOT.EXE C:\MIRCBOT\MIRCBOT.INI

        *** This entire line must be in the Command Line Field!!!

    c.  Don't worry about the Working Directory field, because Windows will
        automatically fill this in the first time you use the icon.

    d.  If you wish to change the icon, do so by clicking on Change Icon,
        then click on Browse and select the icon you wish to use.

    e.  Now just click on OK in the Program Item Properties window and your
        bot is set up as an icon in your Program Manager

*Note:  If you set the mIRCBot up in another directory then use the appropiate
        directories for the command line, and please read the [EXTRA NOTES]
        section at the end of this file or the bot will NOT function properly.

Now the hard part is over and your mIRCBot is almost ready to go into use.

Before you continue, you need to go ahead and pick out a nick for your
mIRCBot.  I suggest picking one that will most likely not be used by other
users, because if your bot's nick changes then a few of the protection
devices I've created will become useless unless you change them manually.

After selecting a nick for your bot, you are now ready to personalize the 
MIRCBOT.INI file for your usage.

The easiest way to change the things that need to be changed is to open
the MIRCBOT.INI file in a text editor and do a search for the following:

1.  Do a search for BOTNAME and replace it with the nick you chose for your bot.
    * There are seven occurences of this, all are located in the events section.

Ok, your mIRCBot is now ready for startup.

[STARTUP]:

First thing to do is to double-click on the MIRCBOT icon in your Program
Manager.  Then click on File then click on Setup and do your usual stuff
so that you can connect to IRC.  After connecting the mIRCBot to IRC for
the first time and first time ONLY, you need to type the following:

/guser 75 Your_Bot's_Nick
then type:
/auser 75 Your_Bot's_Nick

This will add your Bot's nick and address to the remote user list on 
access level 75.  ONLY your bot should be put on this access level!!!

If you have your other mIRC client connected to IRC already then type
the following:

/guser 50 Your_Nick

This will add your address to the remote user list on access level 50.
This access level is only intended for you because it has complete
control over the bot.  If you put anyone else on this level then I'd 
suggest it be a VERY, VERY, VERY good friend that you can trust 
completely!!!

*Note:  After doing these steps, click on Tools, then click Remote and
        view your entries that you just put into the user list.
        It should read:

        75:Your_Bot's_Nick!*Your_Username@Your_Domain
        75:Your_Bot's_Nick
        50:Your_Nick!*Your_Username@Your_Domain

        *Note:  If part of your domain is dynamic (meaning it changes)
                then replace that part of it with a *
        *Note:  It is very important that you have the nick in front of
                the address or else it will read both you and the bot as
                being on the same access level.
                *Note:  The only way to get around this is to use a bogus
                        username.  But I am by no means suggesting that 
                        you do that!!!

If those entries are correct in your remote user list, your mIRCBot is now
ready for operation.  You shouldn't have to repeat these steps unless you 
change your nick or the bot's nick.  If you do change the bot's nick then 
make sure you change the six occurences of the old nick in the events
section.  Now I'll tell you what to expect from the bot and how to view
the help files.

ABOUT THE mIRCBot:

*Note:  A user's address should NEVER be placed on the default level!!!
        The default level means that all users are automatically on that
        level unless their address is placed on a higher level.  There is
        one exception to this and it is explained in the shitlist section.

The bot's default level is level 1.  This means that all users are on level 1,
whether they are in the userlist or not.  When a level 1 user joins a channel
the bot is on, the bot will add their nick to level 2.  If a level 1 user is
already on a channel when the bot joins, the next time that user says anything
in the channel the bot will add their nick to level 2.  The bot will automatically
remove all nicks from it's user list when the nick leaves the channel, quits irc,
or gets kicked from the channel.  The only exception to this is the bot's nick
itself.  

*Note: all addresses in the user list will remain for future use.

Access levels 1 through 19 are not allowed to obtain ops on a channel if the
bot has ops unless issued by the bot either through a ctcp command, a public
command, or if you switch to the bot and op them.  Ops are not obtainable from
other users as well as a server if a netsplit occurs.

[ACCESS LEVEL 20]:  (For Friends)

The next user access level is level 20, the first of your friends level.  If a
level 20 user joins a channel that the bot is on, the bot will add their nick to
level 20.  If a level 20 user is already on a channel before the bot joins, they
either need to leave and rejoin the channel, msg the bot with any text, or you need
to add their nick to the appropiate level manually (see addons.txt) in order for
the bot to recognize them properly.  Access level 20 will allow the user to be
opped on a channel by another person or by a server if a netsplit occurs, but they
will not be auto-oped. Access level 20 also enables the user to use the following
commands:

Through ctcp commands a level 20 user can invite themselves to a channel the
bot is on, can get a real ping response, and have access to the friends fileserver.

Through public commands a level 20 user can invite another user to the channel
the bot is on.

*Note:  If the channel is invite only, the bot must have ops to invite people.

*Note:  All higher access levels will also be able to use these commands.

[ACCESS LEVEL 30]:  (For Good Friends)

If a level 30 user joins a channel that the bot is on, the bot will add their nick
to level 30 and automatically op them if the bot has ops.  If a level 30 user is
already on a channel before the bot joins, they need to either leave and rejoin the
channel, msg the bot with any text, or you need to add their nick to level 30 
manually (see addons.txt) in order for the bot to recognize them properly.  Access
level 30 will allow the user to be opped on a channel by another person or by a 
server if a netsplit occurs.  If a level 30 user is deoped on a channel the bot is
on and the bot has ops and has recognized the user by adding their nick to level 30,
the person who deoped them will be deoped and the level 30 user will be reopped.
If a level 30 user is kicked from a channel that the bot is on and the bot has ops 
and has recognized the user by adding their nick to level 30, the person who kicked 
them will be kicked and the level 30 user will be invited back to the channel.  
The only exception to the deop and kick protection is if it's done by the bot 
either through a ctcp command, a public command, or if you switch to the bot
and deop or kick them.

Access level 30 allows the user to use the level 20 commands as well as the
following:

Through ctcp commands a level 30 user can op themselves in a channel the bot 
is on, and unban someone on a channel the bot is on.

*Note: They can only do so if the bot has ops on the channel.

Through public commands a level 30 user can op themselves in a channel the bot
is on, unban someone an a channel the bot is on, add a user to the bot's user
list on access level 20 only, add a user to the bot's shitlist, remove a person
from the shitlist.

*Note: The above notes apply here also.

*Note: The bot will not add it's own nick to level 20 or shitlist itself through
       these commands as long as you changed all the occurences of BOTNAME in
       the MIRCBOT.INI.

[ACCESS LEVEL 40]:  (For Really Good Friends)

If a level 40 user joins a channel the bot is on, the bot will add their nick
to level 40 and automatically op them if the bot has ops.  If a level 40 user
is already on a channel that the bot joins, they need to either leave and rejoin
the channel, msg the bot with any text, or you need to add their nick to 
level 40 manually (see addons.txt) in order for the bot to recognize them 
properly.  If a level 40 user invites the bot to a channel, the bot will
automatically join that channel.  The deop and kick protection for level 30 
applies to level 40 also.

Access level 40 allows the user to use the level 20 commands and the level 30
commands as well as the following:

Through ctcp commands a level 40 user can send a msg through the bot to another
nick or a channel that the bot is on.

*Note:  The msg will note the nick and the address of the user who sends it.

Through public commands a level 40 user can ban another person, bkick another 
person (this deops, bans, kicks, and shitlists), change the channel mode, deop
another person, kick another person, give ops to another person.

*Note:  The bot must have ops for most of these commands.

*Note:  The bot will not ban, bkick, deop, or kick itself through these commands
        as long as you changed all the occurences of BOTNAME in the MIRCBOT.INI.

[ACCESS LEVEL 50]:  (For The Bot's Owner)

This is your access level.  When you join a channel that the bot is on, the bot
will add your nick to level 50 and automatically op you if the bot has ops.  If
you are already on a channel that the bot joins, you need to either leave and 
rejoin the channel, msg the bot with any text, or add your nick to level 50 
manually (see addons.txt) in order for the bot to recognize you properly.  If
you invite the bot to a channel, the bot will automatically join.  The deop and
kick protection for levels 30 and 40 applies to your level also.

Access level 50 allows you to use the level 20 commands, the level 30 commands,
the level 40 commands as well as the following:

*Note:  The add command is different in that it requires you to specify the 
        user level;  this allows you to add a user to any access level.

Through ctcp commands access level 50 can add a user to any level, send a msg to
all channels the bot is on, set the bot as away, ban a nick on a channel, bkick
a nick on a channel, change the channel mode, deop a nick on a channel, close the
mircbot client, give ops to a nick on a channel, invite a nick to a channel, make
the bot join a channel, kick a nick from a channel, change the bot's mode, change 
the bot's nick, make the bot leave a channel, make the bot quit irc without closing
the client, make the bot leave and rejoin a channel, remove a user or nick from the
user list, send a msg to a channel or a nick as tho the bot sent the msg, make the 
bot change servers, shitlist a nick, set a timer on the bot, set the bot as unaway,
and unshitlist a user.

*Note:  These commands will work on all users, including the bot;  so it can
        make the bot ban, deop, kick, and/or shitlist itself.

*Note:  Some of these commands require that the bot has ops.

Through public commands access level 50 can add a nick to any level, make the bot
quit irc and close the mircbot client, make the bot join a channel, make the bot
leave a channel, change the bot's nick, make the bot quit irc without closing the
client, remove a user or nick from the user list, and make the bot change servers.

*Note:  Type /ctcp Bot's_Nick helpme
        for how to use the help.

*Note:  There is a help file for every single command available.
        So read the help to find out how to use these commands.

[ACCESS LEVEL 75] (The Bot's Level)

If you change the bot's nick the newnick is automatically added to the userlist,
but will not be changed in the events which keep level 30 and 40 users from using
PUBLIC commands on the bot itself.

If anyone (including you) deops or kicks the bot without using a bot command to do
it, the user is automatically shitlisted;  so if the bot regains ops, the next time
the user says anything in the channel they will be kicked and banned from the 
channel.  ONLY the BOT can deop or kick itself without being shitlisted.  This can
only be done by ctcp commands for access level 50 only or by switching to the bot
and performing the commands.

[ACCESS LEVEL =150] (The Shitlisted Level)

The bot's shitlist is not nice at all.  If a shitlisted user joins a channel the 
bot is on, the user is automatically banned and kicked from the channel with the
message You are on my shitlist!!!  If a shitlisted user is already on a channel
before the bot joins, the next time the user says anything on the channel they 
are automatically banned and kicked from the channel with the message You are on
my shitlist!!!

Note:  The bot must have ops for this to work.

If a shitlisted user sends the bot a msg, a reply msg is sent telling them they
are being ignored because they are shitlisted.

If a shitlisted user attempts to use a ctcp command with the bot, they will be
sent a notice telling them to go away, they are shitlisted!!!

You can unshitlist a person by either removing their address and nick if still
still there, by using the add command (either ctcp or public) to add their 
address to another access level, or by using the public &unshit command (this
will add the user's address to the default level.

*Note:  The public &unshit command is only a temporary way of unshitlisting 
        a user and does require a little bit of maintenance on your part.
        See the maintenance section.

Your friends on access level 30 or 40 can unshitlist a friend by using the
public &add command, which will add the friend to access level 20.  They 
can unshitlist a regular user by using the public &unshit command; this 
command will add the user's address to the default level.

[EXTRA NOTES]:  Please read this carefully.

I have set up a fileserver for the bot to offer files to people instead of
XDCC.  Trust me when I say that a fileserver is much less headache to add
and remove files that you want to offer to people.  I have set up two 
different levels of the fileserver, one for your friends and one for default
level users;  your friends will also have access to the files in the default
level users' directory as well so there is no need to duplicate files.  Put
whatever files you want to in the appropiate directory.

The default level fileserver will start the user in the
 
C:\MIRCBOT\FRIENDS\DEFAULT directory and play the C:\MIRCBOT\DEFAULT.TXT file.

*Note:  If you set up this bot in another directory then you need to edit
        the MIRCBOT.INI file as follows:

In a text editor search for these lines:

cm10=1:xdcc:/fserve *1:$nick 5 c:\mircbot\friends\default c:\mircbot\default.txt

and

ev35=1:on text:=&xdcc*:#:/fserve *1:$nick 5 c:\mircbot\friends\default c:\mircbot\default.txt

then you may change the directories and files to whatever you wish.

---------------------------------------------------------------------------------------------

The friends level fileserver will start the user in the 

C:\MIRCBOT\FRIENDS directory and play the C:\MIRCBOT\FRIENDS.TXT file.

*Note:  If you set up this bot in another directory then you need to edit
        the MIRCBOT.INI file as follows:

In a text editor search for these lines:

cm14=20:xdcc:/fserve *1:$nick 5 c:\mircbot\friends c:\mircbot\friends.txt

and

ev48=20:on text:=&xdcc*:#:/fserve *1:$nick 5 c:\mircbot\friends c:\mircbot\friends.txt

then you may change the directories and files to whatever you wish.

----------------------------------------------------------------------------------------------

I've set up the bot to automatically accept DCC Gets and put the file in the 

C:\MIRCBOT\UPLOADS directory.  I highly suggest that you run a virus scan on 

anything someone puts in this directory.  You never know what you will get on
the Internet.

If you do not wish to use the fileserver, then get in touch with me and I'll give 
you the MIRCBOT.INI file without the fileserver setup.


[MAINTENANCE]:  this is the only maintenance that is required by you.

The bot will add users nicks to the user list as explained in the preceding sections.
If a user's nick is on the user list and that nick leaves the channel, quits IRC from 
the channel, or is kicked from the channel, the bot will remove the user's nick from
the user list. However, if the bot leaves the channel or quits IRC, there will still
be a list of nicks in the user list.  When this occurs you need to go into the user
list and delete all the nicks added (no matter what level) except the bot's nick.
NEVER delete the bot's nick from the user list. An easy way to do this is to either
do it when you close the bot down for the day or right before you start the bot up.
This is important because if someone uses one of your friends' nicks then that person
will actually be on your friend's access level if the nick is left in the user list.
Just remember to delete out all nicks in the user list except the bot's.

Another piece of maintenance is required when the unshit command is used to unshitlist
a user.  This command will add the user's address the default level 1.  You need to delete
this address out as soon as possible because with the address being on level 1, everytime
the user says anything in the channel the bot will readd their nick to the user list on
level 2.  This is really not important if the person doesn't say much, but if they are
a big talker this can tie the bot up and possibly cause something important to be missed.
Just remember that the only addresses that should be in the user list is level 20 and over.
There should never be a reason for a user's address to be in the user list if they are
below level 20.  You might also want to check your shitlisted addresses at the end of the
irc session as well;  if you want the user to remain shitlisted then leave the address,
if not then delete it.  Only addresses are needed for the shitlist.

[CREDITS]:  this part is dedicated to all the people who allowed or inspired this bot.

First of all the biggest credit needs to go to Khaled for programming the mIRC client.
mIRC is the best IRC client for windows that I've come across.  I look forward to 
using future versions of this client.

The next credit goes to _Shorty for his claybearbot for mIRC.  His claybearbot gave 
me several ideas for this one and is the only one that did so.  I checked out several
other mIRCBots and they were mostly filled with useless commands and events.  _Shorty's
bot is very useful and protective; I hope this one can compare to it.
But anyways, credit is given where credit is due.  My hat is off to ya _Shorty.

The next credit is the last one and probably the most important one.
Credit and thanks go to my lovely wife Valerie who calls it "the DAMN BOT!!"
Although, she did help set up the addons for ya'll, and she also double checked 
the commands and help files as well.  Thank you sweetheart for your love and 
patience with me.

And that all folks....

Don't forget to read the addons.txt

I expect the new version of mIRC to be out within the next few weeks.
I will be updating this bot for the new version as soon as it comes out.
So find me online (with the nick majus usually) or email me.

To report any problems, send any comments or suggestions, add your email
address to my update list, or just to tell me whatever, email me at

jhubbar2@whale.st.usm.edu