1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-11 15:52:25 -05:00

Finally stopped the "error on character" printout (removed console.writeline in Kayak submodule)

Fixed console execute button cascading on IE/Edge
Fixed reports truncating reason if space in target name
If multiple matches are found when finding a player, a list of matches is shown
Reallowed special characters in names/chat
stats command player isn't required
Added prune command
This commit is contained in:
RaidMax
2017-11-16 17:09:19 -06:00
parent a56f386644
commit cdeb7e8eaf
18 changed files with 177 additions and 115 deletions

View File

@ -367,8 +367,8 @@ copy /Y "$(ProjectDir)lib\Kayak.dll" "$(SolutionDir)BUILD\lib"
xcopy /Y /I /E "$(ProjectDir)webfront\*" "$(SolutionDir)BUILD\Webfront"
xcopy /Y /I /E "$(SolutionDir)Admin\Config\*" "$(SolutionDir)BUILD\Config"
if $(ConfigurationName) == Release-Nightly powershell.exe -file "$(SolutionDir)DEPLOY\publish_nightly.ps1" 1.5
if $(ConfigurationName) == Release-Stable powershell.exe -file "$(SolutionDir)DEPLOY\publish_stable.ps1" 1.5
if $(ConfigurationName) == Release-Nightly powershell.exe -file "$(SolutionDir)DEPLOY\publish_nightly.ps1" 1.6
if $(ConfigurationName) == Release-Stable powershell.exe -file "$(SolutionDir)DEPLOY\publish_stable.ps1" 1.6
</PostBuildEvent>
</PropertyGroup>

View File

@ -37,19 +37,19 @@ namespace IW4MAdmin
class Request : IHttpRequestDelegate
{
public void OnRequest(HttpRequestHead request, IDataProducer requestBody, IHttpResponseDelegate response, string IP)
public void OnRequest(HttpRequestHead request, IDataProducer requestBody, IHttpResponseDelegate response)
{
var logger = ApplicationManager.GetInstance().GetLogger();
logger.WriteInfo($"HTTP request {request.Path}");
logger.WriteInfo($"QueryString: {request.QueryString}");
logger.WriteInfo($"IP: {IP}");
logger.WriteDebug($"HTTP request {request.Path}");
logger.WriteDebug($"QueryString: {request.QueryString}");
logger.WriteDebug($"IP: {request.IPAddress}");
NameValueCollection querySet = new NameValueCollection();
if (request.QueryString != null)
querySet = System.Web.HttpUtility.ParseQueryString(SharedLibrary.Utilities.StripIllegalCharacters(request.QueryString));
querySet = System.Web.HttpUtility.ParseQueryString(request.QueryString);
querySet.Set("IP", IP);
querySet.Set("IP", request.IPAddress);
try
{

View File

@ -15,7 +15,7 @@ namespace IW4MAdmin
static void Main(string[] args)
{
Version = 1.5;
Version = 1.6;
handler = new ConsoleEventDelegate(OnProcessExit);
SetConsoleCtrlHandler(handler, true);

View File

@ -257,11 +257,33 @@ namespace IW4MAdmin
E.Target = Players[cNum];
}
List<Player> matchingPlayers;
if (E.Target == null) // Find active player including quotes (multiple words)
E.Target = GetClientByName(E.Data.Trim());
{
matchingPlayers = GetClientByName(E.Data.Trim());
if (matchingPlayers.Count > 1)
{
await E.Origin.Tell("Multiple players match that name");
throw new SharedLibrary.Exceptions.CommandException($"{E.Origin} had multiple players found for {C.Name}");
}
else if (matchingPlayers.Count == 1)
E.Target = matchingPlayers.First();
}
if (E.Target == null) // Find active player as single word
E.Target = GetClientByName(Args[0]);
{
matchingPlayers = GetClientByName(Args[0]);
if (matchingPlayers.Count > 1)
{
await E.Origin.Tell("Multiple players match that name");
foreach (var p in matchingPlayers)
await E.Origin.Tell($"[^3{p.ClientID}^7] {p.Name}");
throw new SharedLibrary.Exceptions.CommandException($"{E.Origin} had multiple players found for {C.Name}");
}
else if (matchingPlayers.Count == 1)
E.Target = matchingPlayers.First();
}
if (E.Target == null && C.RequiresTarget)
{
@ -600,7 +622,7 @@ namespace IW4MAdmin
else // Not a command
{
E.Data = E.Data.StripColors().CleanChars();
E.Data = E.Data.StripColors();
// this should not be done for all messages.
//if (E.Data.Length > 50)
// E.Data = E.Data.Substring(0, 50) + "...";

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,13 @@
Version 1.5
Version 1.6:
CHANGELOG:
-got rid of pesky "error on character" message
-optimizations to commands
-report reason doesn't truncate if there's a space in the target name
-If multiple matches are found when finding a player, a list of matches is shown
-"special" characters are allowed in names and messages
-prune command demotes inactive admins (defaults to 30 days if no days are specified)
Version 1.5
CHANGELOG:
-added back player history graphs (past 12 hours every 15 minutes)
-fixed issue with configurationmanager files and threading
@ -8,7 +17,7 @@ CHANGELOG:
-started working on more advanced statistics
-all chat is stored
-word cloud displays most commonly used words on the server
-fixed misc issuess
-fixed misc issues
VERSION 1.4
CHANGELOG:
@ -27,7 +36,6 @@ CHANGELOG:
-webfront playerlist level colors are hidden to non admin users
-tempban length can now be specified (<int>m, <int>h, <int>d, <int>y)
VERSION 1.3
CHANGELOG:
-complete rewrite of lots of parts

View File

@ -25,7 +25,7 @@ div#content .serverTitle { width: calc( 100% / 3); background-color: #007ACC; }
div#content .serverPlayers { text-align: right; width: calc( 100% / 3); background-color: #007ACC; }
div#content .serverMap { text-align: center; width: calc( 100% / 3); background-color: #007ACC; }
div#content .serverPlayerList {float: right; margin: 0.5em; }
div#content .serverChatList { float: left; margin: 0.5em }
div#content .serverChatList { float: left; margin: 0.5em; max-width: 60%; overflow:hidden }
div#content .playerName { font-size: 1.1vw; color: rgba(78, 140, 77, 0.64); width: 10em; text-align: right; }
div#content .playerName:hover { color: rgb(0, 122, 204) !important; }
div#content .chatPlayerName { font-weight: bold; font-size: 1.1vw; color:#fff; padding-right: 0.5em; opacity: 0.5; }
@ -60,7 +60,7 @@ div#content .hiddenWrapper { color: #007ACC;}
div#content #consoleWrap { width: 60%; margin: 0 auto; }
div#content #console { padding: 1em; height: 35vh; background-color: #181818; }
div#content #consoleWrap .search { width: calc(80% - 10px); }
div#content #consoleWrap .search { width: calc(80% - 10px); float: left; }
div#consoleWrap .playerSearchWrap input[type="text"]:focus, select:focus { border-width: 0; outline: none; }
div#consoleWrap .playerSearchWrap { margin: 0 !important; width: 100%; }
div#consoleWrap .searchButton { width: calc(20% - 10px); }