using System.Collections.Generic;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Interfaces.Network;
namespace Robust.Server.Interfaces.Console
{
///
/// The server console shell that executes commands.
///
public interface IConsoleShell
{
///
/// A map of (commandName -> ICommand) of every registered command in the shell.
///
IReadOnlyDictionary AvailableCommands { get; }
///
/// Initializes the ConsoleShell service.
///
void Initialize();
///
/// Scans all loaded assemblies for console commands and registers them. This will NOT sync with connected clients, and
/// should only be used during server initialization.
///
void ReloadCommands();
///
/// Sends a text string to the remote player.
///
/// Remote player to send the text message to. If this is null, the text is sent to the local console.
/// Text message to send.
void SendText(IPlayerSession? session, string? text);
///
/// Sends a text string to the remote console.
///
/// Net channel to send the text string to.
/// Text message to send.
void SendText(INetChannel target, string? text);
///
/// Execute a command string on the local shell.
///
/// Command string to execute.
void ExecuteCommand(string command);
///
/// Execute a command string as a player.
///
/// Session of the remote player. If this is null, the command is executed as the local console.
/// Command string to execute.
void ExecuteCommand(IPlayerSession? player, string command);
}
}