#############################################
##               Features                  ##
#############################################


- Store upcoming wars into a database, clan members can add themselves to these as full player or substitute.

- The bot announce the next war in the topic and asks for players if there are any missing ( less than specified number ) for a war planned in the next 24h.

- You can add the result of a war played ( this kind of war without scores appears in the pending list ).

- You can also add the score of a match that you played and that was not planned by the bot.

- You can set a MOTD on your clan private chan to make some advertice to your members.

- You can retrieve informations about wars in database on your private or public channels like !search, !last or !next ( commands available depends of the chan where these are used ).

- The bot can generate an html webpage from a template file ( = html file that you can customise and the bot will fill it with war results ) and can upload it on the ftp server of your website.

- Many other Commands for an easyest management of wars for warmanager and also for players ( !agenda, ... )

- Flood protection for commands on the public chan included.

- Multiple games support. Simply add gametypes at the top of the script.

- Multiple instances support. Simply change the war_clanprefix variable so that it is unique.

- Added a topic prefix as you don't want to edit the code. Simply edit the variable to anything you want. Reminder: The more you ad to the prefix the less space you have for the wars.

#########################
# Public Chan Commands  #
#########################


!last <x>     =>  Show the last <x> wars of your clan
!next         =>  Show the next war of your clan
!search <key> =>  Search for any entrie matching <key> in the database ( can be a player and/or a team name, depending of war_searchall setting ) 
!help         =>  Show the available commands on the public chan


#########################
# Private Chan Commands #
#########################


!addmatch gametype(x) team(x) date(hh:mm-dd/mm/yy) map(x) ( + infos(x) or/and number(x) if desired )
=> Add a match in the calendar, infos(x) and number(x) are not required ( Players will be able to !add to this math )

!addresult <id> <your-score> <opponent-score>
=> Add a result on a pending match.

!chinfo <id> <new entries>
=> Change stored informations about <id>. Available entries are the usual trigger: team(), gametype(x), date(),hour(),day(),year(),map(),yourscore(),oppscore(),player(),info(),number(). You can change as many entries as you want at once

!delete <id>
=> Delete a war from database.

!motd <msg>
=> Set a welcome message on the private chan. Use !motd 0 to disable.

!add <id>
=> Add youself to the war referenced by <id>

!remove <id>
=> Remove yourself from the war referenced by <id>

!agenda
=> Shows you all the upcoming match you subscribed

!alias short/long <handle> <alias>
=> Add an alias ( short or long ) to this handle

!search <keyword>
=> Search for any entries in database matching <keyword>

!id <x>
=> Shows you the last <x> entries in database and their ID

!pending <x>
=> Shows you the <x> more recent war waiting for a result

!upcoming <x>
=> Shows you the next <x> war in the calendar

!last <x>
=> Shows you the last <x> war(s)

!help
=> Shows the available commands on the private chan

/msg botnick admin <password>
=> Authenticate yourself in the bot ( only used if you enable war_authsys )


#########################
#   DCC CHAT Commands   #
#########################

.alias <short/long> <handle> <alias>          =>  add an alias for this handle ( will be used in table result and topic, i recommend you to set a short alias for every player )
.convertdb                                 =>  convert an old database ( 1.6x or older ) to the new 1.7 format ( use it only once )


#############################################
##               Version                   ##
#############################################

########
# 1.8  #
########

- Added multiple instances support. The variable war_clanprefix adds a string in front of the triggers and makes sure you will not trigger a different instance.
- Added multiple gametype support. This has been tested in some beta versions and is now added to the script.
- Removed !addscore because it's ambiguous.
- Removed the webstats features as it used alot of cpu when used often. Use the module version for better webstats.
- Removed spelling errors in pm's and tweaked some admin functions.
- Added topic prefix variable to easen the burden. Some people had to edit the code to change the beginning of the topic. Reminder: The more you ad to the prefix the less space you have for the wars.

########
# 1.7  #
########

- New trigger system, more intuitive and more accurable, you can set individual player number for each war and you don't have to use "_" instead of space anymore. The order of informations don't have importance anymore, you can start adding a war with info(x) or with map(x)
- Internal date system completly modified, no more errors at the end of the month or year in automanagement, 200% more accurate ( wars are saved under unixtime ) and bot can now find the day of the war ( ie. Wednesday... )
- New trigger for player : !agenda will show up upcoming wars the player subscribed too.
- The bot shows the number of player who subscribed and number of player required in the listing commands ( !upcoming, etc ) in the form "(3/5) players"
- New variable customisable by the user for a better personalisation of the script ( war_searchall, war_agenda , war_trigger )
- The !chinfo is now more understable ( old one was so complicated, i agree ;) ) and should be more accessible.
- Bug fixed when using more than 1 substitue
- Many other bug fixes solved due to new DB format

########
# 1.6d #
########

- You can now enable a new feature that allow the bot to message all players who subscribed to a war, 15 min before this war.
- You can change the string "admin" used to authenticate ( conflict with my other script pwf.tcl using the same string ).
- Many little changes to improve code.
- Fixed a little bug when using lower and upper case character in channel name.
- Fixed a bug with map statistics.
- Fixed a bug in the html page with substitute.
- Minor bux fixes.

#######
# 1.5 #
#######

- Added new variables to customise the table output in the html generated file ( i think you are now able to customise it at 100% with the template + these settings ).
- Fixed some bugs with the html generated page.
- Fixed bug when using more than 5 players for a game.
- New template included ( sample.template ) wich is a quite beautifuller than the default one ( but i m sure you can do better, it s only to show how to use the new bgcolor features for tables ).
- The players names are now sorted in alphabetic order and separated by a space into the html page.
- New system to avoid the insertion of errors in the database ( date and score ).
- MOTD can now be disabled with !motd 0

#######
# 1.4 #
#######

- Added more stats in the war stats html page ( map stats + average scores ).
- Added variable to hide player line up for upcoming matches on the public channel.
- Added variable to set the default output of the nick size for players in result table  ( works with the .alias command ).
- Added variable to set number of player required fo a war.
- Added variable to disable the upload of the war stats file ( ex: if the webserver is on the same computer as the egg ).
- Added variable to enabale the upload of the war backup file on webserver.
- Added new switch for chinfo : hour and year.
- Auto backup everyday at 00h00 of the WarArchives file ( WarArchives.bak ) and can upload this file to the webserver if enabled.
- New alias system, and master can now add long or short aliases for players' nicks  ( ex: to reduce the size of the topic ).
- The MOTD and the aliases are now saved into a file ( WarMiscs ).
- Bug fixed with the !next public command.

#######
# 1.3 #
#######

- The template for html building now works you can edit it as you wish ( leave spaces arround the variables starting with % ).
- The output on the channel ( !pending, !upcoming, etc ) are now smarter and the collumn size is now proportional to the length of the data.
- First public Version.

#######
# 1.2 #
#######

- Added the html building support with update on you ftp server.

#######
# 1.1 #
#######

- Added the War Management support, the bot add custom msg into the topic and manage all the war calendar.

#######
# 1.0 #
#######