GameServer

Has methods to query game server,listen to logs remotely and to send commands to server using rcon password.

Fixes

Main fixes include:-

Features

Rcon Update

The GetControl method now returns a bool value instead of an rcon instance.If rcon password is valid then it would return true and set the Rcon property else false.

sample code :-

if (server.GetControl(rconPassword))
     Console.WriteLine(server.Rcon.SendCommand("status"));
else
     Console.WriteLine("invalid password");

Log Update

The event mechanism is now separated from the main Log Class.
The new method GetEventsInstance() would return an instance of LogEvents that encapsulates the event mechanism.
Calling GetEventsInstance method would return a new LogEvents instance.

LogEvents supports filtering.

There are 3 types of filter,
All these filters have an action property.this can b set to "Allow" or "block" to filter in/out the log message.
Any number of filters can be added.Filtering is applied in the order they were added.
Any filter can be enabled/disabled at any time.
Filters affect all events present in that instance.

LogEvents also has LogReceived event which is same as listen.
Only difference is filtering is applied on it.

eg:-
If i add a playerfilter with name as "abc",then sample code :-

var event1 = logs.GetEventsInstance();
event1.Filters.Add(new PlayerFilter { Name = "abc", Action = LogFilterAction.Allow });
//Invoked only when abc says something.
event1.Say += (o, e) => Console.WriteLine(e.Message);
var event2 = logs.GetEventsInstance();
event2.Filters.Add(new PlayerFilter { Name = "xyz", Action = LogFilterAction.Allow });
//Invoked only when xyz says something.
event2.Say += (o, e) => Console.WriteLine(e.Message);



Read documentation for more details.