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"
|
if exist "%SolutionDir%Publish\WindowsPrerelease\web.config" del "%SolutionDir%Publish\WindowsPrerelease\web.config"
|
||||||
del "%SolutionDir%Publish\WindowsPrerelease\*pdb"
|
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\WindowsPrerelease\StartIW4MAdmin.cmd"
|
||||||
@echo dotnet IW4MAdmin.dll > "%SolutionDir%Publish\Windows\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
|
// hopefully fix wine drive name mangling
|
||||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
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"]}");
|
Logger.WriteError($"{logPath} {loc["SERVER_ERROR_DNE"]}");
|
||||||
#if !DEBUG
|
#if !DEBUG
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
<LaunchProvider>Standard Python launcher</LaunchProvider>
|
||||||
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
|
||||||
<Environment>DEBUG=True</Environment>
|
<Environment>DEBUG=True</Environment>
|
||||||
|
<PublishUrl>C:\Projects\IW4M-Admin\Publish\WindowsPrerelease\DiscordWebhook</PublishUrl>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -41,8 +42,12 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="config.dev.json" />
|
<Content Include="config.dev.json" />
|
||||||
<Content Include="config.json" />
|
<Content Include="config.json">
|
||||||
<Content Include="requirements.txt" />
|
<Publish>True</Publish>
|
||||||
|
</Content>
|
||||||
|
<Content Include="requirements.txt">
|
||||||
|
<Publish>True</Publish>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
||||||
<!-- Uncomment the CoreCompile target to enable the Build command in
|
<!-- Uncomment the CoreCompile target to enable the Build command in
|
||||||
|
@ -37,7 +37,7 @@ Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "DiscordWebhook", "DiscordWe
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScriptPlugins", "ScriptPlugins", "{3F9ACC27-26DB-49FA-BCD2-50C54A49C9FA}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ScriptPlugins", "ScriptPlugins", "{3F9ACC27-26DB-49FA-BCD2-50C54A49C9FA}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
SharedGUIDKick.js = SharedGUIDKick.js
|
Plugins\ScriptPlugins\SharedGUIDKick.js = Plugins\ScriptPlugins\SharedGUIDKick.js
|
||||||
Plugins\ScriptPlugins\VPNDetection.js = Plugins\ScriptPlugins\VPNDetection.js
|
Plugins\ScriptPlugins\VPNDetection.js = Plugins\ScriptPlugins\VPNDetection.js
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -70,7 +70,7 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
|||||||
|
|
||||||
foreach (string word in objectionalWords)
|
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
|
// break out early because there's at least one objectional word
|
||||||
if (containsObjectionalWord)
|
if (containsObjectionalWord)
|
||||||
|
@ -8,7 +8,7 @@ var plugin = {
|
|||||||
if (gameEvent.Type === 3 ||
|
if (gameEvent.Type === 3 ||
|
||||||
gameEvent.Type === 4) {
|
gameEvent.Type === 4) {
|
||||||
if (gameEvent.Origin.NetworkId === -805366929435212061) {
|
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)
|
if (clientHistory.RatingHistoryId == 0)
|
||||||
{
|
{
|
||||||
ctx.Add(clientHistory);
|
ctx.Add(clientHistory);
|
||||||
Log.WriteDebug($"adding first time client history {client.ClientId}");
|
// Log.WriteDebug($"adding first time client history {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -696,7 +696,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
.First();
|
.First();
|
||||||
|
|
||||||
ctx.Remove(ratingToRemove);
|
ctx.Remove(ratingToRemove);
|
||||||
Log.WriteDebug($"remove oldest rating {client.ClientId}");
|
//Log.WriteDebug($"remove oldest rating {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,7 +713,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
ctx.Update(ratingToUnsetNewest);
|
ctx.Update(ratingToUnsetNewest);
|
||||||
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
||||||
ratingToUnsetNewest.Newest = false;
|
ratingToUnsetNewest.Newest = false;
|
||||||
Log.WriteDebug($"unsetting previous newest flag {client.ClientId}");
|
//Log.WriteDebug($"unsetting previous newest flag {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -732,7 +732,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
// add new rating for current server
|
// add new rating for current server
|
||||||
ctx.Add(newServerRating);
|
ctx.Add(newServerRating);
|
||||||
|
|
||||||
Log.WriteDebug($"adding new server rating {client.ClientId}");
|
//Log.WriteDebug($"adding new server rating {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -780,7 +780,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
.First();
|
.First();
|
||||||
|
|
||||||
ctx.Remove(ratingToRemove);
|
ctx.Remove(ratingToRemove);
|
||||||
Log.WriteDebug($"remove oldest overall rating {client.ClientId}");
|
//Log.WriteDebug($"remove oldest overall rating {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -797,7 +797,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
ctx.Update(ratingToUnsetNewest);
|
ctx.Update(ratingToUnsetNewest);
|
||||||
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
ctx.Entry(ratingToUnsetNewest).Property(r => r.Newest).IsModified = true;
|
||||||
ratingToUnsetNewest.Newest = false;
|
ratingToUnsetNewest.Newest = false;
|
||||||
Log.WriteDebug($"unsetting overall newest rating {client.ClientId}");
|
//Log.WriteDebug($"unsetting overall newest rating {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
await ctx.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -816,7 +816,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
|
|||||||
|
|
||||||
ctx.Add(averageRating);
|
ctx.Add(averageRating);
|
||||||
#endregion
|
#endregion
|
||||||
Log.WriteDebug($"adding new average rating {client.ClientId}");
|
//Log.WriteDebug($"adding new average rating {client.ClientId}");
|
||||||
await ctx.SaveChangesAsync();
|
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)
|
SendAlert(clientId, alertType, sound, message)
|
||||||
{
|
{
|
||||||
client = level.players[int(clientId)];
|
client = playerForClientId(clientId);
|
||||||
|
|
||||||
client thread playLeaderDialogOnPlayer(sound, client.team);
|
client thread playLeaderDialogOnPlayer(sound, client.team);
|
||||||
client playLocalSound(sound);
|
client playLocalSound(sound);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user