MCPcopy Create free account
hub / github.com/demoth/jake2 / SV_ExecuteUserCommand

Method SV_ExecuteUserCommand

server/src/main/java/jake2/server/SV_MAIN.java:809–825  ·  view source on GitHub ↗
(client_t cl, String command)

Source from the content-addressed store, hash-verified

807 }
808
809 private static void SV_ExecuteUserCommand(client_t cl, String command) {
810
811 Com.dprintln("SV_ExecuteUserCommand:" + command );
812
813 List<String> args = Cmd.TokenizeString(command, true);
814 if (args.isEmpty())
815 return;
816
817 final GameImportsImpl game = games.get(cl.gameName);
818 if (userCommands.containsKey(args.get(0))) {
819 userCommands.get(args.get(0)).execute(args, game, cl);
820 return;
821 }
822
823 if (game.sv.state == ServerStates.SS_GAME)
824 game.gameExports.ClientCommand(cl.edict, args);
825 }
826
827 /**
828 * If a packet has not been received from a client for timeout.value

Callers 1

Calls 5

dprintlnMethod · 0.95
TokenizeStringMethod · 0.95
executeMethod · 0.65
ClientCommandMethod · 0.65
getMethod · 0.45

Tested by

no test coverage detected