[Commands] Cleanup #motd Command. (#2190)

This commit is contained in:
Kinglykrab
2022-05-23 19:56:19 -04:00
committed by GitHub
parent eeacc62a91
commit efd04f8324
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -5,11 +5,11 @@ extern WorldServer worldserver;
void command_motd(Client *c, const Seperator *sep)
{
auto outpack = new ServerPacket(ServerOP_Motd, sizeof(ServerMotd_Struct));
ServerMotd_Struct *mss = (ServerMotd_Struct *) outpack->pBuffer;
strn0cpy(mss->myname, c->GetName(), 64);
strn0cpy(mss->motd, sep->argplus[1], 512);
worldserver.SendPacket(outpack);
safe_delete(outpack);
auto pack = new ServerPacket(ServerOP_Motd, sizeof(ServerMotd_Struct));
auto m = (ServerMotd_Struct *) pack->pBuffer;
strn0cpy(m->myname, c->GetName(), sizeof(m->myname));
strn0cpy(m->motd, sep->argplus[1], sizeof(m->motd));
worldserver.SendPacket(pack);
safe_delete(pack);
}