have graph color generated by css so that MS Edge doesn't freak out when using rgba
don't do simple word check on offensive name
This commit is contained in:
parent
85d88815f1
commit
8fc85ef4c1
@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
@ -31,12 +29,9 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
E.Origin.SetAdditionalProperty("_profanityInfringements", 0);
|
||||
|
||||
var objectionalWords = Settings.Configuration().OffensiveWords;
|
||||
bool containsObjectionalWord = objectionalWords.FirstOrDefault(w => E.Origin.Name.ToLower().Contains(w)) != null;
|
||||
var matchedFilters = new List<string>();
|
||||
bool containsObjectionalWord = false;
|
||||
|
||||
// we want to run regex against it just incase
|
||||
if (!containsObjectionalWord)
|
||||
{
|
||||
foreach (string word in objectionalWords)
|
||||
{
|
||||
if (Regex.IsMatch(E.Origin.Name.ToLower(), word, RegexOptions.IgnoreCase))
|
||||
@ -45,7 +40,6 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
matchedFilters.Add(word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (containsObjectionalWord)
|
||||
{
|
||||
|
@ -236,6 +236,10 @@ form *, select {
|
||||
background-color: darken($primary, 10%);
|
||||
}
|
||||
|
||||
style {
|
||||
background-color: darken($primary, 20%);
|
||||
}
|
||||
|
||||
.nav-tabs .nav-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
@ -51,18 +51,6 @@
|
||||
}
|
||||
var charts = {};
|
||||
|
||||
$('.server-history-row').each(function (index, element) {
|
||||
let clientHistory = $(this).data('clienthistory');
|
||||
let serverId = $(this).data('serverid');
|
||||
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
|
||||
let primaryColor = window.getComputedStyle(document.body).getPropertyValue('--primary').trim();
|
||||
let color = $(this).data('online') === 'True' ? primaryColor.endsWith('80') ? primaryColor : primaryColor + '80' : '#ff6060';
|
||||
let width = $('.server-header').first().width();
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color, maxClients);
|
||||
historyChart.render();
|
||||
charts[serverId] = historyChart;
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
$('.server-history-row').each(function (index) {
|
||||
let serverId = $(this).data('serverid');
|
||||
@ -94,6 +82,18 @@ $(document).ready(function () {
|
||||
$('.server-join-button').click(function (e) {
|
||||
$(this).children('.server-header-ip-address').show();
|
||||
});
|
||||
|
||||
$('.server-history-row').each(function (index, element) {
|
||||
let clientHistory = $(this).data('clienthistory');
|
||||
let serverId = $(this).data('serverid');
|
||||
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
|
||||
let primaryColor = $('style').css('background-color');
|
||||
let color = $(this).data('online') === 'True' ? primaryColor : '#ff6060';
|
||||
let width = $('.server-header').first().width();
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color, maxClients);
|
||||
historyChart.render();
|
||||
charts[serverId] = historyChart;
|
||||
});
|
||||
});
|
||||
|
||||
setInterval(refreshClientActivity, 2000);
|
||||
|
Loading…
Reference in New Issue
Block a user