MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / sendRemoteCommand

Function sendRemoteCommand

engine/source/network/RemoteCommandEvent.cc:45–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43IMPLEMENT_CO_NETEVENT_V1(RemoteCommandEvent);
44
45static void sendRemoteCommand(NetConnection *conn, S32 argc, const char **argv)
46{
47 if(U8(argv[0][0]) != StringTagPrefixByte)
48 {
49 Con::errorf(ConsoleLogEntry::Script, "Remote Command Error - command must be a tag.");
50 return;
51 }
52 S32 i;
53 for(i = argc - 1; i >= 0; i--)
54 {
55 if(argv[i][0] != 0)
56 break;
57 argc = i;
58 }
59 for(i = 0; i < argc; i++)
60 conn->validateSendString(argv[i]);
61 RemoteCommandEvent *cevt = new RemoteCommandEvent(argc, argv, conn);
62 conn->postNetEvent(cevt);
63}

Calls 3

errorfFunction · 0.85
validateSendStringMethod · 0.80
postNetEventMethod · 0.80

Tested by

no test coverage detected