[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -237,7 +237,7 @@ int command_init(void)
command_add("merchant_close_shop", "Closes a merchant shop", AccountStatus::GMAdmin, command_merchantcloseshop) ||
command_add("merchant_open_shop", "Opens a merchants shop", AccountStatus::GMAdmin, command_merchantopenshop) ||
command_add("modifynpcstat", "- Modifys a NPC's stats", AccountStatus::GMLeadAdmin, command_modifynpcstat) ||
command_add("motd", "[new motd] - Set message of the day", AccountStatus::GMLeadAdmin, command_motd) ||
command_add("motd", "[Message of the Day] - Set Message of the Day (leave empty to have no Message of the Day)", AccountStatus::GMLeadAdmin, command_motd) ||
command_add("movechar", "[Character ID|Character Name] [Zone ID|Zone Short Name] - Move an offline character to the specified zone", AccountStatus::Guide, command_movechar) ||
command_add("movement", "Various movement commands", AccountStatus::GMMgmt, command_movement) ||
command_add("myskills", "- Show details about your current skill levels", AccountStatus::Player, command_myskills) ||

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);
}