Unofficial Kaillera Server v0.919 (15 June 2005)
New development (c) 2005 Charles Bilyué
Based on decompilation of 'Kaillera Server 0.86 for Win32
(Feb 15 2002/17:43:08)'

Kaillera Server 0.86 for Win32 (Feb 15 2002/17:43:08)
(c) 2001 Christophe Thibault


 Thanks go out to [ -Astral- ], [ -Blazed- ], [ -G_Man- ],
[ -Karasu- ], busty, easyplayer, Holy, -= Gou 37 -X- =-,
-= The Utility Man -X- =-, Sent, KoKo, Sinister_Cyclops,
weaponx(aka K3N$HIN), \\Blue//, milkandcookies, WìLDFîRE,
åÐmîrâ£âkbâr]°[-]<²ø-]°[~, SSJGOKU, danpyung, as well as anyone else I
may have forgotten for helping debug this server; and Naruto the Rogue and
[ -,\'oX-BaKa- ] for running this server, as well as anyone else who might
have.

(If I've forgotten you, or 'misspelled' your handle, please contact me and
remind/correct me.. thanks!)

----
 This package includes a Kaillera server binary compiled from decompiled
source after modification.

 The efforts of decompilation and modification were done primarily to greatly
reduce the impact of abusive users/attackers on Kaillera.

 To reduce problems with clients having difficulty connecting to your servers,
try to keep the user limit less than or equal to 40.  This should eliminate
most if not all such problems.  Keeping your MotD as short as possible may
also be helpful.  It has not been tested, but it may help to begin with two
empty MotD ?lines, after that ensuring no 3 consecutive MotD lines exceeds 500
bytes.  Be aware that these suggestions apply even to servers running other
Kaillera server software, due to limitations in the Kaillera protocols.


 Requests for additional changes should be forwarded directly to me (TRAC).
It is up to you to find a means for forwarding such information - I tend
to not be that hard to find, if you know where to look.

 If you still cannot find me, you can "/msg TRAC" on FreeNode IRC, at
irc.freenode.net .


 The primary changes incorporated into this binary are listed below.
----

v0.919
 Changed behavior of input remapping when a user leaves the game; now all
mappings to users including and above the user who left are adjusted down
one to compensate.
 Added new game lobby commands '/lagstat' and '/lagreset'; '/lagstat'
attempts to report on who is the user lagging most in the game, and
'/lagreset' resets the lag-checking system (use it shortly before /lagstat
if game has been running awhile).
 Fixed a bug in connect type reporting in the web server.

v0.918
 Fixed a bug which prevented connect types other than 'good' from working
properly.

v0.917
 Reduced wasted time in many buffer clears, improving performance.
 Fixed another buffer overflow vulnerability rooted in the original
server.
 Added 'host inheritance', where the earliest-joining player in a game
lobby when the host (the game creator, initially) leaves will become the
new host.
 Added two new game lobby commands (primarily to aid with host inheritance);
'/start' starts the game, just as the start button in the standard client;
and '/kick #' kicks a user in a game by number, similar in usage to the
/ban command.
 Added protection for MAME32k clients which disallows a game from being
restarted until all users have dropped from it.
 Added an alert for when a user joins a game with a different client
version than that of the creator.

v0.916
 Fixed a bug which caused user input switching to be reset when a
user joined a game (they are reset on any game start, however).
 Added three new game lobby commands; '/swapreset' resets input
switching; '/ban #' bans a user in a game by number, ex: '/ban 5' to
ban the 5th user in the game (standard Kaillera client lists user 1 on
the bottom of the list by default); and '/banreset' clears all existing
bans in a game (whether automatic bans, or bans requested with the '/ban'
command.

v0.915
 Rewrote the keyframe arbitration routine to be far more efficient.
 Added checking to prevent use of tabs and newlines in chat.
 Added notifications to games for when a user is dropped from a game
due to timeouts.
 Added a '/swap ####' command usable by game creator in game lobby,
to allow switching of user inputs during a game.  Up to 8 players may
be remapped, and duplicates are allowed.
Numbers are to be specified in order; 0 means 'do not change mapping'.
ex: "/swap 2104" will set input 1 to player 2, input 2 to player 1,
and input 4 to player 4, without affecting input 3 or any others;
"/swap 3" will change input 1 to player 3 without affecting any others;
and "/swap 002" will change input 3 to player 2.

v0.914
 Fixed a bug which could cause a client who was not responding
to pings (or responding more slowly than once per two seconds)
to be spammed with them until they timed out.
 Made some more adjustments to improve performance, including
eliminating a lot of unnecessary copying of data.
 Changed compilation method to eliminate game slowdown for games
with more than 2 players.
 Fixed a bug that could cause clients in a game to be notified that
a user left when they had never been allowed to join.
 Eliminated some more crash exploit vulnerabilities rooted in the
original server.

v0.913
 Improved checking in configuration file loader.
 Added a configurable automatic user banning system for users abusing
 the server (lots of new options in configuration file).
 Added a configurable automatic user banning system for preventing
users repeatedly kicked out of games from rejoining (new options
in configuration file).
 Changed the name of the ping limit configuration file option from
'MinPing' to 'MaxPing' (far more appropriate).
 Added enforcement of user limits in games; games now default to a
user limit of 8, and the limit can be changed by the game lobby
creator with a '/limit #' command in the game lobby, where # is the
new user limit.

v0.912
 Fixed another buffer overflow vulnerability rooted in the original
server.
 Made some more adjustments to improve performance.
 Added code to reduce problems during login for users with packet
loss.
 Added an alternate algorithm for calculating user ping (max ping
as opposed to average ping) and an option for switching between the
two methods.
 Added an option to change the number of pings sent by the server
during login.

v0.911
 Fixed a bug in the configuration loading routine that snuck in the
previous release.
 Tweaked code in several places to improve performance.

v0.91
 Extended flood protection to game joins/creations.
 Added separate configuration variables for controlling flood protection for
game chat (Game_FloodMsgNb and Game_FloodMsgTime) and game joins/creations
(Join_FloodMsgNb and Join_FloodMsgTime).
 Fixed a serious crash bug (flaw from decompilation) in web server.

v0.9 (initial)
 Eliminated user name buffer overflow vulnerabilitity.
 Added a workaround to correct unterminated chat messages before being
broadcast to clients.
 Added some protection against user ID spoofing (untested).
 Disallowed kick requests from users other than the appropriate game lobby
creator.
 Extended flood protection to game lobbies (uses same limits/counters for
now, so try not to be too strict).

