Use Chat_Add1 instead of String_Format1 and Chat_Add

This commit is contained in:
TomCube 2024-04-28 20:47:16 -05:00 committed by GitHub
parent 1ebfbc9a6a
commit 66a77e6242
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,16 +272,8 @@ static void MotdCommand_Execute(const cc_string* args, int argsCount) {
Chat_AddRaw("&eThis command can only be used in multiplayer.");
return;
}
char namebuff[74];
char motdbuff[74];
cc_string name, motd;
String_InitArray(name, namebuff);
String_InitArray(motd, motdbuff);
String_Format1(&name, "&eName: &f%s", &Server.Name);
String_Format1(&motd, "&eMOTD: &f%s", &Server.MOTD);
Chat_Add(&name);
Chat_Add(&motd);
Chat_Add1("&eName: &f%s", &Server.Name);
Chat_Add1("&eMOTD: &f%s", &Server.MOTD);
}
static struct ChatCommand MotdCommand = {