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