public void AdminActionHandler(GameServer server, GameSession session, CAdminActionReqMessage message) { var args = message.Command.GetArgs(); if (!server.CommandManager.Execute(session.Player, args)) { session.Player.SendConsoleMessage(S4Color.Red + "Unknown command"); } }
public async Task <bool> OnHandle(MessageContext context, CAdminActionReqMessage message) { var session = context.GetSession <Session>(); var plr = session.Player; await _commandService.Execute(plr, message.Command.GetArgs()); return(true); }