fixed issue with mapname not being updated
This commit is contained in:
parent
8e7622c64e
commit
8a8d2e3ba6
@ -100,11 +100,11 @@ namespace IW4MAdmin
|
||||
return new Event(GType.Say, Utilities.removeNastyChars(message), SV.clientFromEventLine(line, 2), null, SV);
|
||||
}
|
||||
|
||||
if (eventType == ":")
|
||||
return new Event(GType.MapEnd, null, null, null, null);
|
||||
if (eventType == ":")
|
||||
return new Event(GType.MapEnd, line[0], new Player("WORLD", "WORLD", 0, 0), null, null);
|
||||
|
||||
if (line[0].Length > 400) // blaze it
|
||||
return new Event(GType.MapChange, line[0], null, null, null);
|
||||
if (line[0].Split('\\').Length > 5) // blaze it
|
||||
return new Event(GType.MapChange, line[0], new Player("WORLD", "WORLD", 0, 0), null, null);
|
||||
|
||||
|
||||
return null;
|
||||
|
@ -1071,9 +1071,36 @@ namespace IW4MAdmin
|
||||
if (E.Type == Event.GType.MapChange)
|
||||
{
|
||||
Log.Write("New map loaded - " + clientnum + " active players", Log.Level.Debug);
|
||||
String[] statusResponse = E.Data.Split('\\');
|
||||
if (statusResponse.Length >= 15 && statusResponse[13] == "mapname")
|
||||
mapname = maps.Find(m => m.Name.Equals(statusResponse[14])).Alias; //update map for heartbeat
|
||||
|
||||
Dictionary<String, String> infoResponseDict = new Dictionary<String, String>();
|
||||
String[] infoResponse = E.Data.Split('\\');
|
||||
|
||||
for (int i = 0; i < infoResponse.Length; i++)
|
||||
{
|
||||
if (i % 2 == 0 || infoResponse[i] == String.Empty)
|
||||
continue;
|
||||
infoResponseDict.Add(infoResponse[i], infoResponse[i + 1]);
|
||||
}
|
||||
|
||||
String newMapName = null;
|
||||
infoResponseDict.TryGetValue("mapname", out newMapName);
|
||||
|
||||
if (newMapName != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
mapname = maps.Find(m => m.Name.Equals(mapname)).Alias;
|
||||
}
|
||||
|
||||
catch (Exception)
|
||||
{
|
||||
Log.Write(mapname + " doesn't appear to be in the maps.cfg", Log.Level.Debug);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
Log.Write("Could not get new mapname from InitGame line!", Log.Level.Debug);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1124,7 +1151,7 @@ namespace IW4MAdmin
|
||||
public void Tell(String Message, Player Target)
|
||||
{
|
||||
if (Target.getClientNum() > -1)
|
||||
RCON.addRCON("tell " + Target.getClientNum() + " " + Message + "^7");
|
||||
RCON.addRCON("tellraw " + Target.getClientNum() + " " + Message + "^7"); // I fixed tellraw :>
|
||||
}
|
||||
|
||||
public void Kick(String Message, Player Target)
|
||||
|
@ -27,4 +27,5 @@ mp_fuel2:Fuel
|
||||
mp_storm:Storm
|
||||
mp_complex:Bailout
|
||||
mp_compact:Salvage
|
||||
iw4_credits:IW4 Credits
|
||||
mp_raidmax:^1L^23^33^4T^5M^6A^75^8T^93^0R
|
@ -1,6 +1,7 @@
|
||||
VERSION: 0.9.1
|
||||
CHANGELOG:
|
||||
fixed issue with `history` timelime
|
||||
-fixed issue with `history` timelime
|
||||
-fixed issue with mapname not being updated
|
||||
|
||||
VERSION: 0.9
|
||||
CHANGELOG:
|
||||
|
@ -13,8 +13,7 @@ function drawChart() {
|
||||
data.addRows(players);
|
||||
|
||||
var options = {
|
||||
//curveType: 'function',
|
||||
//width: 900,
|
||||
//curveType: 'function', still haven't decided on this
|
||||
height: 300,
|
||||
legend: {position: 'none'},
|
||||
enableInteractivity: true,
|
||||
@ -27,13 +26,13 @@ function drawChart() {
|
||||
viewWindowMode: 'explicit',
|
||||
viewWindow: {
|
||||
min: 0,
|
||||
max: 18
|
||||
max: 18 // for iw4
|
||||
},
|
||||
},
|
||||
hAxis: {
|
||||
viewWindow: {
|
||||
//min: players[0][0],
|
||||
//max: players[players.length-1][0]
|
||||
//min: players[0][0], no longer needed as timeline adjusts automatically
|
||||
//max: players[players.length-1][0] // ditto
|
||||
},
|
||||
gridlines: {
|
||||
count: 12,
|
||||
|
@ -11,10 +11,10 @@ Global
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Debug|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Debug|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release|Any CPU.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
Reference in New Issue
Block a user