1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

tweaked the custom callbacks and added two new fields that are logged

prevent script kill events with no valid origin or target from being triggered
This commit is contained in:
RaidMax
2018-02-27 22:19:54 -06:00
parent 370c9ede04
commit a920b19780
12 changed files with 257 additions and 19 deletions

View File

@ -0,0 +1,44 @@
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

View File

@ -0,0 +1,8 @@
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!

View File

@ -0,0 +1,6 @@
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

View File

@ -0,0 +1,2 @@
127.0.0.1
80

View File

@ -43,12 +43,14 @@ namespace IW4MAdmin
if (polledPlayer.Name.Length < 3)
{
Logger.WriteDebug($"Kicking {polledPlayer} because their name is too short");
await this.ExecuteCommandAsync($"clientkick {polledPlayer.ClientNumber} \"Your name must contain atleast 3 characters.\"");
return false;
}
if (Players.FirstOrDefault(p => p != null && p.Name == polledPlayer.Name) != null)
{
Logger.WriteDebug($"Kicking {polledPlayer} because their name is already in use");
await this.ExecuteCommandAsync($"clientkick {polledPlayer.ClientNumber} \"Your name is being used by someone else.\"");
return false;
}
@ -56,6 +58,7 @@ namespace IW4MAdmin
if (polledPlayer.Name == "Unknown Soldier" ||
polledPlayer.Name == "UnknownSoldier")
{
Logger.WriteDebug($"Kicking {polledPlayer} because their name is generic");
await this.ExecuteCommandAsync($"clientkick {polledPlayer.ClientNumber} \"Please change your name using /name.\"");
return false;
}
@ -99,6 +102,7 @@ namespace IW4MAdmin
else if (existingAlias.Name == polledPlayer.Name)
{
client.CurrentAlias = existingAlias;
client.CurrentAliasId = existingAlias.AliasId;
await Manager.GetClientService().Update(client);
}
player = client.AsPlayer();

View File

@ -67,7 +67,7 @@
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /Y &quot;$(SolutionDir)BUILD\Plugins&quot; &quot;$(TargetDir)Plugins\&quot;&#xD;&#xA;xcopy /Y /I /E &quot;$(SolutionDir)BUILD\Lib&quot; &quot;$(TargetDir)&quot;" />
<Exec Command="xcopy /Y &quot;$(SolutionDir)BUILD\Plugins&quot; &quot;$(TargetDir)Plugins\&quot;&#xD;&#xA;xcopy /Y /I /E &quot;$(SolutionDir)BUILD\Lib&quot; &quot;$(TargetDir)&quot; &#xD;&#xA;&#xD;&#xA;xcopy /Y /I /E &quot;$(ProjectDir)Application\Config&quot; &quot;$(TargetDir)Config&quot;" />
</Target>
</Project>