mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
fix reading PT6 having signed decimal GUID in log
fix alternative encoding character converting allow more paths for game log server add localization for unknown ips in welcome plugin add gamelog server uri to support game log server on games that must supply manual log path misc fixes
This commit is contained in:
@ -78,16 +78,14 @@ namespace SharedLibraryCore.RCon
|
||||
byte[] payload = null;
|
||||
bool waitForResponse = Config.WaitForResponse;
|
||||
|
||||
string converterEncoding(string text)
|
||||
{
|
||||
var destinationEncoding = Encoding.GetEncoding("windows-1252");
|
||||
byte[] originalEncodedBytes = Utilities.EncodingType.GetBytes(text);
|
||||
byte[] convertedBytes = Encoding.Convert(Utilities.EncodingType, destinationEncoding, originalEncodedBytes);
|
||||
return destinationEncoding.GetString(convertedBytes);
|
||||
string convertEncoding(string text)
|
||||
{
|
||||
byte[] convertedBytes = Utilities.EncodingType.GetBytes(text);
|
||||
return Utilities.EncodingType.GetString(convertedBytes);
|
||||
}
|
||||
|
||||
string convertedRConPassword = converterEncoding(RConPassword);
|
||||
string convertedParameters = converterEncoding(parameters);
|
||||
string convertedRConPassword = convertEncoding(RConPassword);
|
||||
string convertedParameters = convertEncoding(parameters);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -109,6 +107,10 @@ namespace SharedLibraryCore.RCon
|
||||
waitForResponse |= true;
|
||||
payload = (Config.CommandPrefixes.RConGetInfo + '\0').Select(Convert.ToByte).ToArray();
|
||||
break;
|
||||
case StaticHelpers.QueryType.COMMAND_STATUS:
|
||||
waitForResponse |= true;
|
||||
payload = string.Format(Config.CommandPrefixes.RConCommand, convertedRConPassword, "status\0").Select(Convert.ToByte).ToArray();
|
||||
break;
|
||||
}
|
||||
|
||||
byte[] response = null;
|
||||
|
@ -35,6 +35,11 @@ namespace SharedLibraryCore.RCon
|
||||
/// RCon password is required
|
||||
/// </summary>
|
||||
COMMAND,
|
||||
/// <summary>
|
||||
/// get the full server command information
|
||||
/// RCon password is required
|
||||
/// </summary>
|
||||
COMMAND_STATUS
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user