| 43 | IMPLEMENT_CO_NETEVENT_V1(RemoteCommandEvent); |
| 44 | |
| 45 | static 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 | } |
no test coverage detected