LFS Session Timing
==================

Version: 0.1
Author: Cristbal Marco (makakazo)

"LFS Session Timing" is a basic InSim application written in C/C++ using the CInsim
library written by Cristbal Marco. The CInsim library uses WinSock2 for the socket
communication, so be sure to link to it.

This has been written highly focused on being a tutorial on programming with InSim
and understanding it.

PThreads-win32 was used for this project, so be sure to link to it when compiling,
and place the pthreads DLL in the working directory of the executable. PThreads-win32
is a library that provides a POSIX pthreads API for WIN32 environments. It is licensed
under the LGPL. You can find info and source @ http://sourceware.org/pthreads-win32/



USAGE:
======

An executable is available and ready to use in the bin folder. You can also compile it
from the sources. You must execute the "LFS Session Timing" executable with 3 arguments:

"LFS Session Timing" (IP) (PORT) (ADMIN_PASS)

A console application will launch and connect to the specified server. It will send
all currently connected players to spectators and then start its job.

To exit, the super admin must type "!exit" in the chat. By default the super admin
is me :) so you must change it in the "main.cpp" and recompile it again. You can also
do a very small modification to the code so ANY admin can exit the application. The
rough way of using Ctrl+C in the console application also works, of course :)



NOTES:
======

A file called insim.h is used. This is the original InSim.txt file included in the 
docs/ folder of your LFS installation, renamed to a .h. The only change that has been
done to this file is in the line 1568:

char	Text[112]; // 0 to 240 characters of text

The original button struct does not define a static text size, but permits different
sizes. As a novice programmer I didn't know how to use buttons with variable sized
texts, so I fixed it to 112. This causes a notable overhead when sending multiple
IS_BTN packets to the server. If anyone knows how to use variable sized text with
this CInsim library please tell me!!!


CONTACT:
========
If you find bugs, or just want to make any comments on the code or the application
itself, look for user "makakazo" at www.lfsforum.net, or for the "LFS Session Timing"
thread.