fixed profanity bug
fix the shared GUID connect fix linux log issue
This commit is contained in:
parent
39596db56e
commit
3d8108f339
@ -54,6 +54,9 @@ del "%SolutionDir%Publish\Windows\*pdb"
|
||||
if exist "%SolutionDir%Publish\WindowsPrerelease\web.config" del "%SolutionDir%Publish\WindowsPrerelease\web.config"
|
||||
del "%SolutionDir%Publish\WindowsPrerelease\*pdb"
|
||||
|
||||
echo making start script
|
||||
echo making start scripts
|
||||
@echo dotnet IW4MAdmin.dll > "%SolutionDir%Publish\WindowsPrerelease\StartIW4MAdmin.cmd"
|
||||
@echo dotnet IW4MAdmin.dll > "%SolutionDir%Publish\Windows\StartIW4MAdmin.cmd"
|
||||
|
||||
@(echo #!/bin/bash && echo dotnet IW4MAdmin.dll) > "%SolutionDir%Publish\WindowsPrerelease\StartIW4MAdmin.sh"
|
||||
@(echo #!/bin/bash && echo dotnet IW4MAdmin.dll) > "%SolutionDir%Publish\Windows\StartIW4MAdmin.sh"
|
||||
|
@ -808,10 +808,10 @@ namespace IW4MAdmin
|
||||
// hopefully fix wine drive name mangling
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
logPath = Regex.Replace($"{Path.DirectorySeparatorChar}{LogPath}", @"[A-Z]:", "");
|
||||
logPath = Regex.Replace($"{Path.DirectorySeparatorChar}{LogPath}", @"[A-Z]:/", "");
|
||||
}
|
||||
|
||||
if (!File.Exists(LogPath) && !logPath.StartsWith("http"))
|
||||
if (!File.Exists(logPath) && !logPath.StartsWith("http"))
|
||||
{
|
||||
Logger.WriteError($"{logPath} {loc["SERVER_ERROR_DNE"]}");
|
||||
#if !DEBUG
|
||||
|
@ -16,6 +16,7 @@
|
||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
||||
<Environment>DEBUG=True</Environment>
|
||||
<PublishUrl>C:\Projects\IW4M-Admin\Publish\WindowsPrerelease\DiscordWebhook</PublishUrl>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -41,8 +42,12 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="config.dev.json" />
|
||||
<Content Include="config.json" />
|
||||
<Content Include="requirements.txt" />
|
||||
<Content Include="config.json">
|
||||
<Publish>True</Publish>
|
||||
</Content>
|
||||
<Content Include="requirements.txt">
|
||||
<Publish>True</Publish>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
||||
<!-- Uncomment the CoreCompile target to enable the Build command in
|
||||
|
@ -37,7 +37,7 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "DiscordWebhook", "DiscordWe
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScriptPlugins", "ScriptPlugins", "{3F9ACC27-26DB-49FA-BCD2-50C54A49C9FA}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
SharedGUIDKick.js = SharedGUIDKick.js
|
||||
Plugins\ScriptPlugins\SharedGUIDKick.js = Plugins\ScriptPlugins\SharedGUIDKick.js
|
||||
Plugins\ScriptPlugins\VPNDetection.js = Plugins\ScriptPlugins\VPNDetection.js
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -70,7 +70,7 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
|
||||
foreach (string word in objectionalWords)
|
||||
{
|
||||
containsObjectionalWord |= Regex.IsMatch(E.Origin.Name.ToLower(), word, RegexOptions.IgnoreCase);
|
||||
containsObjectionalWord |= Regex.IsMatch(E.Data.ToLower(), word, RegexOptions.IgnoreCase);
|
||||
|
||||
// break out early because there's at least one objectional word
|
||||
if (containsObjectionalWord)
|
||||
|
@ -8,7 +8,7 @@ var plugin = {
|
||||
if (gameEvent.Type === 3 ||
|
||||
gameEvent.Type === 4) {
|
||||
if (gameEvent.Origin.NetworkId === -805366929435212061) {
|
||||
gameEvent.Origin.Kick('Your GUID is generic. Delete players/guids.dat and rejoin', _utilities.IW4MAdminClient);
|
||||
gameEvent.Origin.Kick('Your GUID is generic. Delete players/guids.dat and rejoin', _IW4MAdminClient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -668,7 +668,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
if (clientHistory.RatingHistoryId == 0)
|
||||
{
|
||||
ctx.Add(clientHistory);
|
||||
Log.WriteDebug($"adding first time client history {client.ClientId}");
|
||||
// Log.WriteDebug($"adding first time client history {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@ -696,7 +696,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
.First();
|
||||
|
||||
ctx.Remove(ratingToRemove);
|
||||
Log.WriteDebug($"remove oldest rating {client.ClientId}");
|
||||
//Log.WriteDebug($"remove oldest rating {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@ -713,7 +713,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
ctx.Update(ratingToUnsetNewest);
|
||||
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
||||
ratingToUnsetNewest.Newest = false;
|
||||
Log.WriteDebug($"unsetting previous newest flag {client.ClientId}");
|
||||
//Log.WriteDebug($"unsetting previous newest flag {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
@ -732,7 +732,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
// add new rating for current server
|
||||
ctx.Add(newServerRating);
|
||||
|
||||
Log.WriteDebug($"adding new server rating {client.ClientId}");
|
||||
//Log.WriteDebug($"adding new server rating {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
|
||||
#endregion
|
||||
@ -780,7 +780,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
.First();
|
||||
|
||||
ctx.Remove(ratingToRemove);
|
||||
Log.WriteDebug($"remove oldest overall rating {client.ClientId}");
|
||||
//Log.WriteDebug($"remove oldest overall rating {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
|
||||
@ -797,7 +797,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
ctx.Update(ratingToUnsetNewest);
|
||||
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
||||
ratingToUnsetNewest.Newest = false;
|
||||
Log.WriteDebug($"unsetting overall newest rating {client.ClientId}");
|
||||
//Log.WriteDebug($"unsetting overall newest rating {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
@ -816,7 +816,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
||||
|
||||
ctx.Add(averageRating);
|
||||
#endregion
|
||||
Log.WriteDebug($"adding new average rating {client.ClientId}");
|
||||
//Log.WriteDebug($"adding new average rating {client.ClientId}");
|
||||
await ctx.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +0,0 @@
|
||||
var plugin = {
|
||||
author: 'RaidMax',
|
||||
version: 1.0,
|
||||
name: 'Shared GUID Kicker Plugin',
|
||||
|
||||
onEventAsync: function (gameEvent, server) {
|
||||
// connect event
|
||||
if (gameEvent.Type === 3 ||
|
||||
gameEvent.Type === 4) {
|
||||
if (gameEvent.Origin.NetworkId === -805366929435212061) {
|
||||
gameEvent.Origin.Kick('Your GUID is generic. Delete players/guids.dat and rejoin', _IW4MAdminClient);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
onLoadAsync: function (manager) {
|
||||
},
|
||||
|
||||
onUnloadAsync: function () {
|
||||
},
|
||||
|
||||
onTickAsync: function (server) {
|
||||
}
|
||||
};
|
@ -33,7 +33,7 @@ WaitForCommand()
|
||||
|
||||
SendAlert(clientId, alertType, sound, message)
|
||||
{
|
||||
client = level.players[int(clientId)];
|
||||
client = playerForClientId(clientId);
|
||||
|
||||
client thread playLeaderDialogOnPlayer(sound, client.team);
|
||||
client playLocalSound(sound);
|
||||
|
Loading…
Reference in New Issue
Block a user