Feature: Add command for client sending msg to master

This commit is contained in:
shaun
2025-12-15 16:21:00 +01:00
parent 52239dbfba
commit 250ae09898
9 changed files with 77 additions and 16 deletions

View File

@@ -268,6 +268,7 @@ enum {
TOKEN_ERROR = 230, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
TOKEN_SHELL_DATA = 231, // <20>ն˽<D5B6><CBBD><EFBFBD>
CMD_EXECUTE_DLL = 240, // ִ<>д<EFBFBD><D0B4><EFBFBD>
TOKEN_CLIENT_MSG = 241, // <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϣ
};
enum MachineCommand {
@@ -1154,4 +1155,16 @@ typedef struct CharMsg {
}
}CharMsg;
typedef struct ClientMsg {
char cmd;
char title[31];
char text[512];
ClientMsg() { memset(this, 0, sizeof(*this)); }
ClientMsg(const char* title, const char* text) {
cmd = TOKEN_CLIENT_MSG;
strcpy_s(this->title, title ? title : "<EFBFBD><EFBFBD>ʾ<EFBFBD><EFBFBD>Ϣ");
strcpy_s(this->text, text ? text : "");
}
}ClientMsg;
#endif