示例#1
0
        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");
            }
        }
示例#2
0
        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);
        }