public void HandleConsoleMessage(ClientStructure client, ChatConsoleMsgData message) { if (client.Authenticated && AdminCommands.Retrieve().Contains(client.PlayerName)) { CommandHandler.HandleServerInput(message.Message); } }
public static void SendConsoleMessageToAdmins(string text) { var admins = AdminCommands.Retrieve(); foreach (var client in ClientRetriever.GetAuthenticatedClients().Where(c => admins.Contains(c.PlayerName))) { var messageData = new ChatConsoleMsgData { From = GeneralSettings.SettingsStore.ConsoleIdentifier, Message = text }; MessageQueuer.SendToClient <ChatSrvMsg>(client, messageData); } }