mirror of
https://github.com/Tribufu/ServerManagers
synced 2026-08-08 20:21:06 +00:00
Rcon Command Changes
- moved the rcon commands to the gamedata files, so they can be extended.
This commit is contained in:
parent
f3ff807cd0
commit
e7100e6323
18 changed files with 266 additions and 152 deletions
|
|
@ -29,7 +29,6 @@ namespace ServerManagerTool.Lib
|
|||
private const string NoResponseMatch = "Server received, But no response!!";
|
||||
public const string NoResponseOutput = "NO_RESPONSE";
|
||||
|
||||
public const string RCON_COMMAND_BROADCAST = "broadcast";
|
||||
public const string RCON_COMMAND_LISTPLAYERS = "listplayers";
|
||||
public const string RCON_COMMAND_GETCHAT = "getchat";
|
||||
public const string RCON_COMMAND_SERVERCHAT = "serverchat";
|
||||
|
|
@ -315,18 +314,21 @@ namespace ServerManagerTool.Lib
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (command.command.Equals(RCON_COMMAND_BROADCAST, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
LogEvent(LogEventType.Chat, command.rawCommand);
|
||||
command.suppressOutput = true;
|
||||
}
|
||||
|
||||
if (command.command.Equals(RCON_COMMAND_SERVERCHAT, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
LogEvent(LogEventType.Chat, command.rawCommand);
|
||||
command.suppressOutput = true;
|
||||
}
|
||||
|
||||
foreach (var item in GameData.GetMessageRconInputModes())
|
||||
{
|
||||
if (command.command.Equals(item.ValueMember, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
LogEvent(LogEventType.Chat, command.rawCommand);
|
||||
command.suppressOutput = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This is bound to the UI thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue