mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-06 11:58:57 -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))
|
||||
|
Reference in New Issue
Block a user