mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
more config updates
This commit is contained in:
@ -1,44 +0,0 @@
|
||||
mp_rust:Rust
|
||||
mp_highrise:Highrise
|
||||
mp_terminal:Terminal
|
||||
mp_crash:Crash
|
||||
mp_nightshift:Skidrow
|
||||
mp_quarry:Quarry
|
||||
mp_afghan:Afghan
|
||||
mp_derail:Derail
|
||||
mp_estate:Estate
|
||||
mp_favela:Favela
|
||||
mp_highrise:Highrise
|
||||
mp_invasion:Invasion
|
||||
mp_checkpoint:Karachi
|
||||
mp_quarry:Quarry
|
||||
mp_rundown:Rundown
|
||||
mp_boneyard:Scrapyard
|
||||
mp_nightshift:Skidrow
|
||||
mp_subbase:Sub Base
|
||||
mp_underpass:Underpass
|
||||
mp_brecourt:Wasteland
|
||||
mp_overgrown:Overgrown
|
||||
mp_strike:Strike
|
||||
mp_vacant:Vacant
|
||||
mp_abandon:Carnival
|
||||
mp_trailerpark:Trailer Park
|
||||
mp_fuel2:Fuel
|
||||
mp_storm:Storm
|
||||
mp_complex:Bailout
|
||||
mp_compact:Salvage
|
||||
mp_nuked:Nuketown
|
||||
iw4_credits:IW4 Credits
|
||||
mp_killhouse:Killhouse
|
||||
mp_bog_sh:Bog
|
||||
mp_cargoship_sh:Freighter
|
||||
mp_shipment:Shipment
|
||||
mp_shipment_long:Shipment - Long
|
||||
mp_rust_long:Rust - Long
|
||||
mp_firingrange:Firing Range
|
||||
mp_storm_spring:Chemical Plant
|
||||
mp_fav_tropical:Favela - Tropical
|
||||
mp_estate_tropical:Estate - Tropical
|
||||
mp_crash_tropical:Crash - Tropical
|
||||
mp_bloc_sh:Forgotten City
|
||||
mp_raidmax:^1L^23^33^4T^5M^6A^75^8T^93^0R
|
@ -1,8 +0,0 @@
|
||||
60
|
||||
Over ^5{{TOTALPLAYTIME}} ^7man hours have been played on this server!
|
||||
This server uses ^5IW4M Admin v{{VERSION}} ^7get it at ^5raidmax.org/IW4MAdmin
|
||||
^5IW4M Admin ^7sees ^5YOU!
|
||||
This server has harvested the information of ^5{{TOTALPLAYERS}} ^7players!
|
||||
Cheaters are ^1unwelcome ^7 on this server
|
||||
Did you know 8/10 people agree with unverified statistics?
|
||||
^5{{TOTALKILLS}} ^7innocent people have been murdered in this server!
|
@ -1,6 +0,0 @@
|
||||
Cheating/Exploiting is not allowed
|
||||
Respect other players
|
||||
Administrators have the final say
|
||||
No Racism or excessive trolling
|
||||
Keep grenade launcher use to a minimum
|
||||
Balance teams at ALL times
|
@ -44,7 +44,6 @@ namespace IW4MAdmin
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Console.Write("Enter server RCON password: ");
|
||||
|
@ -111,12 +111,17 @@ namespace IW4MAdmin
|
||||
BuildConfiguration();
|
||||
var settings = AppSettings.Get<ApplicationConfiguration>();
|
||||
|
||||
if (settings == null)
|
||||
if (settings?.Servers == null)
|
||||
{
|
||||
settings = ConfigurationGenerator.GenerateApplicationConfig();
|
||||
settings.Servers = ConfigurationGenerator.GenerateServerConfig(new List<ServerConfiguration>());
|
||||
var newSettings = ConfigurationGenerator.GenerateApplicationConfig();
|
||||
newSettings.Servers = ConfigurationGenerator.GenerateServerConfig(new List<ServerConfiguration>());
|
||||
newSettings.AutoMessagePeriod = settings.AutoMessagePeriod;
|
||||
newSettings.AutoMessages = settings.AutoMessages;
|
||||
newSettings.Rules = settings.Rules;
|
||||
newSettings.Maps = settings.Maps;
|
||||
settings = newSettings;
|
||||
|
||||
var appConfigJSON = JsonConvert.SerializeObject(settings, Formatting.Indented);
|
||||
var appConfigJSON = JsonConvert.SerializeObject(newSettings, Formatting.Indented);
|
||||
File.WriteAllText($"{AppDomain.CurrentDomain.BaseDirectory}IW4MAdminSettings.json", appConfigJSON);
|
||||
BuildConfiguration();
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ namespace IW4MAdmin
|
||||
playerCountStart = DateTime.Now;
|
||||
}
|
||||
|
||||
if (LastMessage.TotalSeconds > MessageTime && BroadcastMessages.Count > 0 && ClientNum > 0)
|
||||
if (LastMessage.TotalSeconds > Manager.GetApplicationSettings().AutoMessagePeriod && BroadcastMessages.Count > 0 && ClientNum > 0)
|
||||
{
|
||||
await Broadcast(Utilities.ProcessMessageToken(Manager.GetMessageTokens(), BroadcastMessages[NextMessage]));
|
||||
NextMessage = NextMessage == (BroadcastMessages.Count - 1) ? 0 : NextMessage + 1;
|
||||
@ -588,8 +588,10 @@ namespace IW4MAdmin
|
||||
Website = "this server's website";
|
||||
}
|
||||
|
||||
InitializeMaps();
|
||||
|
||||
this.Hostname = hostname.Value.StripColors();
|
||||
this.CurrentMap = Maps.Find(m => m.Name == mapname.Value) ?? new Map(mapname.Value, mapname.Value);
|
||||
this.CurrentMap = Maps.Find(m => m.Name == mapname.Value) ?? new Map() { Alias = mapname.Value, Name = mapname.Value };
|
||||
this.MaxClients = maxplayers.Value;
|
||||
this.FSGame = game.Value;
|
||||
|
||||
@ -619,7 +621,7 @@ namespace IW4MAdmin
|
||||
}
|
||||
|
||||
#endif
|
||||
string mainPath = (GameName == Game.IW4 && onelog.Value >=0) ? "userraw" : "main";
|
||||
string mainPath = (GameName == Game.IW4 && onelog.Value >= 0) ? "userraw" : "main";
|
||||
|
||||
string logPath = (game.Value == "" || onelog?.Value == 1) ?
|
||||
$"{basepath.Value.Replace('\\', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}{mainPath}{Path.DirectorySeparatorChar}{logfile.Value}" :
|
||||
@ -643,7 +645,6 @@ namespace IW4MAdmin
|
||||
Logger.WriteInfo($"Log file is {logPath}");
|
||||
#if !DEBUG
|
||||
await Broadcast("IW4M Admin is now ^2ONLINE");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -753,7 +754,7 @@ namespace IW4MAdmin
|
||||
FSGame = (await this.GetDvarAsync<string>("fs_game")).Value.StripColors();
|
||||
|
||||
string mapname = this.GetDvarAsync<string>("mapname").Result.Value;
|
||||
CurrentMap = Maps.Find(m => m.Name == mapname) ?? new Map(mapname, mapname);
|
||||
CurrentMap = Maps.Find(m => m.Name == mapname) ?? new Map() { Alias = mapname, Name = mapname };
|
||||
|
||||
// todo: make this more efficient
|
||||
((ApplicationManager)(Manager)).AdministratorIPs = (await new GenericRepository<EFClient>().FindAsync(c => c.Level > Player.Permission.Trusted))
|
||||
|
@ -0,0 +1,241 @@
|
||||
{
|
||||
"AutoMessagePeriod": 60,
|
||||
"AutoMessages": [
|
||||
"Over ^5{{TOTALPLAYTIME}} ^7man hours have been played on this server!",
|
||||
"This server uses ^5IW4M Admin v{{VERSION}} ^7get it at ^5raidmax.org/IW4MAdmin",
|
||||
"^5IW4M Admin ^7sees ^5YOU!",
|
||||
"This server has harvested the information of ^5{{TOTALPLAYERS}} ^7players!",
|
||||
"Cheaters are ^1unwelcome ^7 on this server",
|
||||
"Did you know 8/10 people agree with unverified statistics?",
|
||||
"^5{{TOTALKILLS}} ^7innocent people have been murdered in this server!"
|
||||
],
|
||||
"Rules": [
|
||||
"Cheating/Exploiting is not allowed",
|
||||
"Respect other players",
|
||||
"Administrators have the final say",
|
||||
"No Racism or excessive trolling",
|
||||
"Keep grenade launcher use to a minimum",
|
||||
"Balance teams at ALL times"
|
||||
],
|
||||
"Maps": [
|
||||
{
|
||||
"Game": "IW4",
|
||||
"Maps": [
|
||||
{
|
||||
"Alias": "Rust",
|
||||
"Name": "mp_rust"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Highrise",
|
||||
"Name": "mp_highrise"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Terminal",
|
||||
"Name": "mp_terminal"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Crash",
|
||||
"Name": "mp_crash"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Skidrow",
|
||||
"Name": "mp_nightshift"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Quarry",
|
||||
"Name": "mp_quarry"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Afghan",
|
||||
"Name": "mp_afghan"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Derail",
|
||||
"Name": "mp_derail"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Estate",
|
||||
"Name": "mp_estate"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Favela",
|
||||
"Name": "mp_favela"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Highrise",
|
||||
"Name": "mp_highrise"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Invasion",
|
||||
"Name": "mp_invasion"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Karachi",
|
||||
"Name": "mp_checkpoint"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Quarry",
|
||||
"Name": "mp_quarry"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Rundown",
|
||||
"Name": "mp_rundown"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Scrapyard",
|
||||
"Name": "mp_boneyard"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Skidrow",
|
||||
"Name": "mp_nightshift"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Sub Base",
|
||||
"Name": "mp_subbase"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Underpass",
|
||||
"Name": "mp_underpass"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Wasteland",
|
||||
"Name": "mp_brecourt"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Overgrown",
|
||||
"Name": "mp_overgrown"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Strike",
|
||||
"Name": "mp_strike"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Vacant",
|
||||
"Name": "mp_vacant"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Carnival",
|
||||
"Name": "mp_abandon"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Trailer Park",
|
||||
"Name": "mp_trailerpark"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Fuel",
|
||||
"Name": "mp_fuel2"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Storm",
|
||||
"Name": "mp_storm"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Bailout",
|
||||
"Name": "mp_complex"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Salvage",
|
||||
"Name": "mp_compact"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Nuketown",
|
||||
"Name": "mp_nuked"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "IW4 Credits",
|
||||
"Name": "iw4_credits"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Killhouse",
|
||||
"Name": "mp_killhouse"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Bog",
|
||||
"Name": "mp_bog_sh"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Freighter",
|
||||
"Name": "mp_cargoship_sh"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Shipment",
|
||||
"Name": "mp_shipment"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Shipment - Long",
|
||||
"Name": "mp_shipment_long"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Rust - Long",
|
||||
"Name": "mp_rust_long"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Firing Range",
|
||||
"Name": "mp_firingrange"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Chemical Plant",
|
||||
"Name": "mp_storm_spring"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Favela - Tropical",
|
||||
"Name": "mp_fav_tropical"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Estate - Tropical",
|
||||
"Name": "mp_estate_tropical"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Crash - Tropical",
|
||||
"Name": "mp_crash_tropical"
|
||||
},
|
||||
|
||||
{
|
||||
"Alias": "Forgotten City",
|
||||
"Name": "mp_bloc_sh"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -70,7 +70,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="xcopy /Y "$(SolutionDir)BUILD\Plugins" "$(TargetDir)Plugins\"
xcopy /Y /I /E "$(SolutionDir)BUILD\Lib" "$(TargetDir)" 

xcopy /Y /I /E "$(ProjectDir)Application\Config" "$(TargetDir)Config"" />
|
||||
<Exec Command="xcopy /Y "$(SolutionDir)BUILD\Plugins" "$(TargetDir)Plugins\"
xcopy /Y /I /E "$(SolutionDir)BUILD\Lib" "$(TargetDir)" 
" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user