SCL is a Member of the Future Games Network

News Section
Strategy Section
ScM/SCX Section
Community Section
Features Section
The Bnet Buddy
The Aeon of Strife

War of the Tribes - A SCL Campaign
The Scion VI Saga
The Winters Bot
News/Download/Introduction
Users Guide
Owners Guide
FAQ
Version History
Professional Gamers League


1999 StarCraft Legacy Starcraft Site Awards

001724

Running a Winters Bot

Once you get your Winters Bot downloaded and unzipped, you'll notice several files: winters.exe, winters.html, config.txt, database.txt, and mail.txt. 

File name What it is
winters.exe The bot; double click it to start it up.
winters.html Version history and link to this site.
config.txt Start-up information for the bot.  Edit this to customize your bot.
database.txt Database of players.
mail.txt Botmail messages waiting for delivery.

You may run your bot by double-clicking winters.exe.   This will cause the bot to log on to Battle.net using the name "Guest" and the channel "Winters Bot Testing."  To customize your bot, edit config.txt.

The config file

Each line in config.txt starts with an all-caps keyword followed by the data for that keyword.  You must supply NAME, PASS and CHAN keywords; the others default to reasonable values, so you need not include them if you don't want them.

Keyword & Example What it does
NAME SuperBot Specifies the battle.net account name the bot will use.  You must create the account beforehand, using a Blizzard product such as Starcraft.
PASS 3fk9p Specifies the password to use when logging in.
CHAN SuperFriends Specifies the home channel for the bot.
SERVER 209.67.136.170 Specifies a list of servers to which the the bot will connect.  If a server goes down, winters will use the next server in the list.  You can get a list of servers from your computer's registry.
OWNER AquaMan Specifies the account name of the bot's owner.
LOGFILE winterslog.txt Specifies the name of the log file.  All bot activity is recorded in this file, which can grow very large.  If you use logging, it is recommended that you delete your logs periodically.
AWAY This channel rules!! Specifies the away message of the bot.
TGREET Hi there, %name! Specifies the greeting given to first-time arrivals in the channel.  "%name" is replaced with the nick of the person joining the channel.
GUESTMSG Welcome, %name!! Specifies the greeting given to guests.
REGULARMSG Hail %name!! Specifies the greeting given to channel regulars.
OPERATORMSG All hail %name!! Specifies the greeting given to operators.
MASTERMSG All hail %name!! Specifies the greeting given to the bot master.
BANCHAT If this appears in the config file, the bot will ban all chat users who do not have regular status or above.  This one is highly recommended, to keep enemy bots out of your channel.
BANDIABLODEMO If this appears in the config file, the bot will ban all Diablo demo users who do not have regular status or above.   This one is highly recommended, to keep name spoofers out of your channel.
BANSTARCRAFTDEMO If this appears in the config file, the bot will ban all Starcraft demo users who do not have regular status or above.
BANUNKNOWNPRODUCT If this appears in the config file, the bot will ban all users of products unknown to it.
TIMEKICK 60 Instructs the bot to kick anyone who sits in the channel for more than the given number of minutes.  This is helpful to keep people from idling in the channel and sucking up the ops.  The bot sends a warning five minutes before it kicks anyone.
AUTOPURGE 14 Tells the bot to automatically delete guests from the database if they have not been seen in the given number of days.
IGNOREGUESTS If this appears in the config file, the bot will not respond to commands from guests.  This is useful if your channel is under attack.
TAGBAN BB- FS- Sets up tagbans.  The bot will ban all guests with any of the given tags in any of his/her nicks.  This is a very powerful tool; use it carefully.
COMMAND web {See:}{http://....} Specifies a custom whisper command.  If someone whispers the name of the command (web in the example) to the bot, the bot will whisper back each curly-brace-enclosed phrase.  You can override the 'help' and 'help2' commands with this feature, to add entries for your other custom whisper commands.

Once you have your config file set up, double-click winters.exe to run the bot.

The database file

A Winters Bot keeps track of each person that joins its home channel.  It stores the information in a file called database.txt.  Each line in the database file has information for one person.  Following are two sample database lines:

M [01BE21EB 90DAEB90] #2410331 Roboman *BB-Robocop Reauxbeaux /BB-BFitz

B [01BE21EB 696132C0] #4020564 *PsychoLamer &BB-Robocop GO AWAY LAMER

The first character is the status for this person. In the first example it is M for master; the other status characters are O, R, G and B.   Following the status is a bracket-enclosed hexidecimal representation of when this person was last seen by the bot.   Next comes the user's account number, if any -- it begins with a # character.   Following that are the nicks and antinicks for this person.  The nicks are the account names used by the person, in the order in which they were last seen.  The nick with the * in front of it is the person's primary nick.  Antinicks begin with a / character (see below for more info on antinicks).  In addition, if the user is banned (as in the second example), the name of the person that banned him/her appears with a & character in front, followed by the bantext.

You may edit the database file by hand (using Notepad), but you must be careful.   It's safe to edit the database when the bot is not running; it will read in the changes when it next starts up.  If the bot is running while you edit, you will lose your changes if anyone joins, leaves or talks in the channel because a Winters Bot overwrites the database everytime one of those events happens.   So wait for there to be no traffic in the channel and use the 'reload' command immediately after you save your changes.

Whenever someone joins a Winters Bot's home channel, the bot checks its database.   If the nick is found in the database, the bot greets the newcomer based on his or her status.  If the bot cannot find the nick in the database, it creates a new entry for the nick, giving it guest status, a single nick, no antinicks and no account number, and it issues the greeting given with the TGREET keyword in the config file.

A Winters Bot also performs a /whois on each person that enters the channel, in order to find out that person's account number.  When the /whois returns, the bot looks up the resulting account number in the database to find the "account entry".   It also looks up the person's nick in the database to find the "nick entry".  The bot then compares the two entries.  If the two entries are the same, the bot does nothing; the person has logged on under his or her usual account number (and was already properly greeted by the bot).  However, if the two entries are different, the bot combines the two entries and issues a new greeting.    This combining of entries is what allows the bot to automatically remember multiple names for each person.

Occasionally, combining entries is not the proper thing to do.  For instance, if Robocop goes over to BFitz's house and uses his computer to log in, then it will look as if Robocop is using BFitz's account number, and the bot will combine the two database entries.  This is not what you want; instead, you want Robocop and BFitz to be separate people in the eyes of the bot.  As bot master, you can use "antinicks" to keep the bot from combining entries.  Edit the database by hand, putting the names of the players you want to separate into each others' database entries, but with a / character in front.  This prevents subsequent combining of the two entries.  In the example database line (at the top of this section), BB-Robocop and BB-BFitz's entries can never be automatically combined, even if they use the same account number, because there is an antinick.  In addition to respecting antinicks, the bot will not automatically combine pairs of entries which both have regular status or above.

The 'notmynick' command, in addition to deleting a nick from a database entry, establishes an anti-nick for the deleted nick.  The 'iam' command, in addition to setting the preferred (primary) nick, moves a nick from one database entry to another if the account numbers match, overriding and deleting any conflicting anti-nicks.  For instance, in the above example, if BB-BFitz's database entry contained account number 2410331, he could use "iam bb-robocop" to add his nick to BB-Robocop's entry, even though BB-Robocop has an anti-nick for BB-BFitz.

Security Tips

One of Winters Bot's main goals is to hold a channel in the face of attack from hostile people or bots.  Winters has an array of security features for achieving this goal.  The main feature is the status system.   Winters also employs a sophisticated anti-flood mechanism, to help keep Winters Bots from flooding themselves off.  Winters has the ability to ignore guests, or to autoban users of particular products (Diablo, Starcraft, chat, etc).  Winters ignores whisper commands that come from outside the channel (with the exception of the 'unban' command).  In addition, Winters always ignores Diablo demo users, because of a serious security bug in the Diablo demo which I won't reveal here.  For best security, I recommend turning on the autoban of chat and Diablo demo users, to keep enemy bots and users of the Diablo demo security bug out of your channel.  Operators and regulars will still be able to use those products in your channel.  If you have friendly bots that you want to keep in the channel alongside Winters, make them regulars or operators so that Winters won't ban them.

TOP OF THE PAGE