mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
[Commands] Cleanup #motd Command. (#2190)
This commit is contained in:
parent
eeacc62a91
commit
efd04f8324
@ -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) ||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user