More drop messages.

This commit is contained in:
Paul Chote
2011-01-15 13:56:52 +13:00
parent 2f31928a53
commit e3c090a201
2 changed files with 7 additions and 1 deletions

View File

@@ -185,6 +185,8 @@ namespace OpenRA.Server
{
Log.Write("server", "Rejected connection from {0}; game is already started.",
newConn.socket.RemoteEndPoint);
SendOrderTo(newConn, "ServerError", "The game has already started");
DropClient(newConn);
return;
}
@@ -194,7 +196,6 @@ namespace OpenRA.Server
var mods = handshake.Mods;
// Check that the client has compatable mods
var valid = mods.All( m => m.Contains('@')) && //valid format
mods.Count() == Game.CurrentMods.Count() && //same number
mods.Select( m => Pair.New(m.Split('@')[0], m.Split('@')[1])).All(kv => Game.CurrentMods.ContainsKey(kv.First) &&
@@ -203,6 +204,8 @@ namespace OpenRA.Server
{
Log.Write("server", "Rejected connection from {0}; mods do not match.",
newConn.socket.RemoteEndPoint);
SendOrderTo(newConn, "ServerError", "Your mods don't match the server");
DropClient(newConn);
return;
}