removed /addmod command; replaced with /mods which takes a list.

This commit is contained in:
Chris Forbes
2010-03-07 21:31:54 +13:00
parent a303299bbb
commit b33a24e71d

View File

@@ -364,7 +364,7 @@ namespace OpenRA.Server
return true;
}
}},
{ "addmod",
{ "mods",
s =>
{
if (GameStarted)
@@ -373,21 +373,9 @@ namespace OpenRA.Server
return true;
}
Console.WriteLine("** Added mod: `{0}`", s);
try
{
lobbyInfo.GlobalSettings.Mods =
lobbyInfo.GlobalSettings.Mods.Concat( new[] { s } ).ToArray();
SyncLobbyInfo();
SendChatTo(conn, "Added mod: " + s );
return true;
}
catch
{
Console.WriteLine("Adding the mod failed.");
SendChatTo( conn, "Adding the mod failed.");
return true;
}
lobbyInfo.GlobalSettings.Mods = s.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
SyncLobbyInfo();
return true;
}},
};