MohaaServerWatch from MKF



please keep in mind Serverwatch and ServerWatch Client are still Beta
more Features will come later, if you missing some special once tell me

I only tested ServerWatch on win2k personally - I have some positive feedback from WinXP,Win2k-Server,Win2k-AS

If you have some advices how to make it better and smoother let me know enforcer@majorkillingforce.com


*********************************************************************************
* Moh ServerWatch - from MKF Clan (http://www.majorkillingforce.com/)           *
*                                                                               *
* Development: Daniel Rudolph         enforcer@majorkillingforce.com            *
*                                      daniel@daniel-rudolph.de                 *
*                                                                               *
*                                                                               *
* actual up-to-date Program Version(s):                                         *
*  ServerWatch                : 0.9.9						*
*  ServerWatch-Client         : 0.7.2						*
*  ServerWatch-AntiCheat      : 0.7.3  						*
*		(Changes can be found in the changlog.txt)			*
*										*
*										*
*                                                                               *
*        Download: http://www.daniel-rudolph.de/projekte/serverwatch            *
*        Download/Help: also you can look in the Forum at the MKF Site          *
*              		http://www.majorkillingforce.com                        *
*	 Help	 : #[mkf] @ Quakenet  (my nick Enforcer-)			*
*										*
*										*
*********************************************************************************
***                                                                           ***
***                                                                           ***
***                            Readme updated : 22.01.2005                    ***
***                     old please read SWStartup.html insted                 ***
*********************************************************************************


What is MKF ServerWatch ?!

ServerWatch is an program to control and administrate an Moh (Medal of Honour) Server.
You have to setup a lot of Options and than ServerWatch will keep your Server clean and also log Stats.
The Program is usable for MOHAA (Medal of Honor: Allied Assault) Servers. (It also should work on SPEARHEAD the addon of MOHAA) The ServerWatch itself is also a small Server for the ServerWatch-Clients so that you can have several admins at one Server to the same time without any conflicts or performance problems for the Mohaa Server, because of every Admin has the hole big ServerWatch program running.

What is the ServerWatch itself ?

The ServerWatch itself is the connection to the Moh Server with 2 different methods. The first one is the RCON connection and the second one is the Log file of the Moh Server.
With the connection of this 2 ways of getting information’s from the Server all the described Features from the ServerWatch are possible.
This Program also is reaction as an Server and several ServerWatch-Clients can connect to it at the same time.

What is the ServerWatch-Client ?

The ServerWatch-Client is connection to the ServerWatch (Server) and not the Moh server.
Several admins or just people you give an account, now have the ability to chat witch each other trough the ServerWatch client.
Kick, Ban people and a lot more.
In the ServerWatch you can create as many Users with a login and password and give them the rights you like to.
So you can give every Client the rights you love to.
Maybe the best , the connection from the client to ServerWatch and back are cryptic - so you don’t have any problems of sniffing Passwords or something like that. (like on an normal RCON Connection)

What is the ServerWatch-AntiCheat ?

The ServerWatch-AntiCheat is a program that will run to on the Client PS and will hook-up to the ServerWatch-Anticheat Server.
is someone joins a ServerWatch AntiCheat enabled server. If the player leave the game he get disconnected again.

If the AntiCheat Client is connected to an AntiCheat Server it will make sure that no cheat is installed by sending the needed Information's to the Server. The AntiCheat server will parse that data and can detect cheats that way. Nothing of detection is done on the client. So every server is able to define an own cheat protection Setup.

Who is developing ServerWatch

ServerWatch is programmed from Daniel Rudolph. This is only done in spare time and as you can see its a free program. That has a great advantage for you. You can use it by only sending me a email with a usage report. That is called Email ware. But the great disadvantage is, that you dont have any payed support at all. You can send me a mail and ask me something but it only depends on my mud to answer the mail. So stay clean and dont piss me off ;-) Big thanks go out to [ E|F ] Cobr@ how helping me big time with testing and also bring new ideas into the Project.

Why ServerWatch development has started

I was using some of the standart tools like delator and autokick. That versions that was out on this time was only crap in my mind. Some applications only was reacting for user entry every half hour and other stuff. Thats no problem normally but i just dislike it. If you like the other programs - well its your decision. ServerWatch has a complete other basic structure. The hole Frontend has nothing todo with the functionality. So it will always keep responding. Also i was thinking of a lot more features than on the other programs. Finally a good friend of mine was just telling me that he has tested some AntiCheat software solutions and just got frustrated. So i started developing an anticheat also. The got thing of that is the allready programmed basics from ServerWatch so i just have to include the AntiCheat functions. Also i had a good tested network code from the ServerWatch-Client.
I really hope you like my program , and if you dont like it you hand out a small description what is the reason in doing so.

Features:

Files in this Release:

ServerWatch Server:

ServerWatch.exe - ServerWatch
ServerWatch.map - Debug File for ServerWatch
Data/plink.exe  - this utility is used to get the logfile from the Server with ssh

ServerWatch Client:

SWClient.exe   - ServerWatch Client
SWClient.map   - Debug File for ServerWatch-Client

ServerWatch AntiCheat:

SWAntiCheat.EXE

Files in all releases:

ssleay32.dll            libary for the update engine to make updates from ssl pages possible
libeay32.dll            libary for the update engine to make updates from ssl pages possible
Data/unrar.dll          libary for the update engine to extract the updates




What is necessary to run the ServerWatch Program:

You need an RCON Connection and the Logfile from the Moh Server to run ServerWatch with all features.

What is necessary to run the ServerWatch-Client Program:

You need an running ServerWatch (Server) somewhere and a valid login.





Howto Setup the ServerWatch?

Hint: You can (and also should in the first weeks with ServerWatch) download a default Setup for ServerWatch from my Homepage
Content:

The Moh Server:

You need some special Options for the Mohaa Server that he is logging some facts to a logfile.

Linux Server:

Here  is an setup command example for the Linux Server
 ./mohaa_lnxded +set dedicated 1  +set sv_chatter 1 +set chat 1  +exec youreconfig.cfg +set developer 2 +set logfile 3 &> /full/path/to/thelogfile

Windows Server:

Add this to you’re startup Link for the Moh Server: +set dedicated 1  +set sv_chatter 1 +set chat 1  +exec youreconfig.cfg +set developer 2 +set logfile 3
The Log File should be in the main dir (on the Mohaa Server Dir) and called qconsole.log

The RCON Connection and the Log File:

  Open ServerWatch and open the Setup Dialog - by File menu.
  Open the "Connection Setup" Tab.
  - SSH Setup:
        Host: Enter the IP-Address or Hostname of you’re  SSH Server where the Log file from Mohaa can be found
        Port: The Port of the SSH Server - Default is 22
        Login: The SSH User to login - you have to make sure to have an User added to the Server who has the ability to access the Mohaa Server Log-Files
        Password: The Password for the Login
        Command: This is the most difficult to get i think :D Here you have to enter an command which will print out the actually Logfile and all changes.
                        Most of the times the tail command will do the trick.
                 just enter "tail -f /full/pathto/the/logfile"

  - Direct File Access 
        Just Browse to the Logfile and save the Config

  - RCON Setup
        Host: the IP where the Mohaa Server is running 
        Port: The Port on which the Mohaa Server is running - Default: 12203
        Password: the RCON Password
   
  If you have the Setup done you can test it by starting ServerWatch with the file menu and than take a look @ the Debug Window. Enable some events you want to see like kill and make sure if you can see them.

I cant see some event - what went wrong ?

Weapon Identification:

  Open ServerWatch and open the Setup Dialog - by File menue.
  Open the "Weapon Identification" Tab.
  If you dont have changed the Server Messages for kills here the Regular Expressions that will do the trick. (you can do that the easy way by using the default Config File)

  Rifle: .*rifled.*
  Sniper: .*sniped.*
  Sub Machinegun: .*perforated.*|.*gunned down.*
  Machine Gun: .*machine-gunned.*
  Rocket: .*rocket.*|.*Rocket.*
  Shotgun: .*hunted down.*|.*pumped.* 
  Grenade: .*grenade.*|.*shrapnel.*|.*tripped.*|.*catch.*
  Pistol: .*pistol.*|.*was shot.*|.*clubbed.*|.*bashed.*

  That are Regular Expressions which filter the right weapon of the Logfile for you. Information’s about Regular Expressions can be found in the end of this document.

Message Events:

  Message Events are Timed Messages which will be send automatically if a special chosen event is raised.
  Example: 
        Howto Setup a Welcome Message on every map change:
                Choose the Event "Map Change/Restart" as Event.
                Setup the Message you like in the Message field.
                Setup that the Player field  have to be empty if the Message should be send (with Regular Expressions): 
                   Enter ^$ in the Player1 Field 
                     Explanations:
                        the ^ Means that this match should be in front of the Playernick
                        $ means that the Match should end there
                        and because there is no character between if will only match a empty string 
                        if you set up ^test$ it will only match if a player named test have a mapchange
                        if you set up ^test if will send the message on every mapstart with a Playernick staring with an test
                        if you set up test% if will match only if a player with the test as ending has a map change
                        if you set up test if will send the message every time a player with an test in his Nick has a map change
                Setup a delay you like - maybe 60 (seconds) so that all players a rejoined and see the Message
                Press Add Message - thats it ;-)
        Howto Setup a regular how many players are online Message:
                Choose the Event "Map Change/Restart" as Event.
                Setup the Message you like in the Message field.
                        Maybe %clientcount% players are online with an average Ping of %averageping% (Max: %maxping% Min: %minping%)
                        Explanations:        
                                Here you see the possibilitie to Use Variables on the Messages you can do this everywhere in ServerWatch.
                                A List of variables can be found in the changelog.txt
                        You also should enable delay Event Message parsing becouse of that will make sure that the variables will be passed
                        at this moment the message is send not at the moment the Event Matches
                                What for:        
                                        If you dont setup this and add several that sample Message with different delays the Message send to the 
                                        Server will not contain the actual data - if will contain the Data  from that Moment the Event Matches                                                                                

                Setup that the Player field  have to be empty if the Message should be sended (with Regular Expressions): 
                   Enter ^$ in the Player1 Field 
                Setup a delay - maybe 60 and add the Message
                Then maybe add the Message with different delays lets say every 60 Seconds so you have to add Messages with the delay of:
                        60
                        120
                        180
                        240
                        300 ......

Hidden Features

Some Features with no Setup Dialog yet. To activate them just add it as Line to the MohaaServerWatch.ini

Problems ?

   - possible Problems:
         An error Message appears or/and no Event are shown in the Event List (Event list can be found at the in the Debug page) 
   - please Check:
       - Check the SSH and RCON Log at the Debug page
       - Check the Setup (Passwords, Ip, ..)
   - Problems left ?  
	--> visit www.majorkillingforce.com and look in the ServerWatch Forum
        --> Send mail to enforcer@majorkillingforce.com

Howto Setup the ServerWatch-Client:

Enter the Ip of youre ServerWatch Server you want to use and youre login and password the admin of the ServerWatch told you. 
Also you can setup automatic refresh intervals for the different list if you like to. If you set it to 0 you will have to update that the List manually.


Some Help:

What the hell are Regular Expressions and how can i use them?

A short howto for regular expressions

 regular  expressions are  used in lot of diffrent places in ServerWatch. 
Everytime i need to match a string i do that with regular expressions. 

These pattern can be encoded using the following rules:

- '\'  is the  escape characted  that can  be used  to prefix  any other
character

- '"' can be used as quoting character, it must be escaped using '\'

- '\r',  '\n', '\t' are with similar usage  as in the C language: CR, LF
and TAB characters

- '%XX' allows encoding any character using a hex representation

	This  encoding scheme allows binary data  to be specified in the
	SEND text and in the pattern for the other commands.

	REGEX  is one BRANCH (not a list of branches separated by '|' as
	the  POSIX standards  require). 


BRANCH is a list of PIECEs

PIECE is ATOM followed by '*', '+', '?' or bound:

ATOM *		0 or more matches of the atom
ATOM +		1 or more matches of the atom
ATOM ?		0 or 1 matches of the atom
ATOM {n}	n matches of the atom
ATOM {min,}	min or more matches of the atom
ATOM {min,max}	min to max matches of the atom


ATOM is:

.				match any single char
list of strings separated by '|':
(text1|text2)			match text1 or text2
brace expression:
[chars]				match specified characters
[^chars]			don't match the specified characters
single characters:
char				match specified character
escape_char char		character following escape character


Examples (with escape character '!'):

[]a]			match one char if it is ']' or 'a'
[^]a]			match any char except ']' or 'a'
[!!]			match the current escape character '!'
[a-z]			match letters from 'a' to 'z'

to match a special character it must be escaped:
!*			match '*'
(a!||b!))		match 'a|' or 'b)'
[a!]]			match one character if it is 'a' or ']'

Bounds:
a{0,2}			0 to 2 matches for 'a'
a{5}			5 matches for 'a'
(alpha){2,}		2 or more matches for 'alpha'


Notes about brace expressions ('[chars]'):

- strict  case  matching  is  performed,  i.e.  the caseignore/casematch
options are not checked in this context

- '^' as first characters inverts the result

- ']' used after the first '[' or following the first '^' is not treated
as special character. The same goal can be achieved if it is escaped.

- escaping  in '[chars]' is required only for ']' but can be applied for
any character

Notes about bounds:

- no escaping is required in '{bounds}'

- the bounds are internally stored as 'unsigned long'

- the negative values are converted to unsigned

- (long) -1 is reserved and can't be used as value for min or max

- min <= max

- min >= 0

Notes about texts:

- escaping is required for the special characters: the escape character,
'[', '(', '*', '+', '?', '.'

- in  (text1|text2) escaping is required  only for the escape character,
for '|' and ')'

Remark: this howto is stolen from www.ssi.bg/~ja/netparse

Some links for getting more informations about it

http://builder.com.com/article.jhtml?id=u00220020603dol01.htm
http://www.gnu.org/manual/gawk-3.0.3/html_chapter/gawk_5.html
http://www.antipope.org/charlie/attic/webbook/ch5perl/perl4.html
http://www.zdnet.de/builder/artikel/program/200208/regular_expressions_01-wc.html (german)

How is it possible to setup an SSH Server on a driven Windows machine?

http://tech.erdelynet.com/cygwin-sshd.html



Questions left?

Send a mail to enforcer@majorkillingforce.com

HAVE FUN