removed /addmod command; replaced with /mods which takes a list.
This commit is contained in:
@@ -364,7 +364,7 @@ namespace OpenRA.Server
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
{ "addmod",
|
{ "mods",
|
||||||
s =>
|
s =>
|
||||||
{
|
{
|
||||||
if (GameStarted)
|
if (GameStarted)
|
||||||
@@ -373,21 +373,9 @@ namespace OpenRA.Server
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("** Added mod: `{0}`", s);
|
lobbyInfo.GlobalSettings.Mods = s.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
try
|
SyncLobbyInfo();
|
||||||
{
|
return true;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}},
|
}},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user