mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
[Commands] Cleanup #acceptrules Command (#3716)
# Note - Cleanup messages and logic. - Utilize repositories in database methods.
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
void command_acceptrules(Client *c, const Seperator *sep)
|
||||
{
|
||||
if (!database.GetAgreementFlag(c->AccountID())) {
|
||||
database.SetAgreementFlag(c->AccountID());
|
||||
c->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||
c->Message(Chat::White, "It is recorded you have agreed to the rules.");
|
||||
if (database.GetAgreementFlag(c->AccountID())) {
|
||||
c->Message(Chat::White, "You have already agreed to the rules.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
database.SetAgreementFlag(c->AccountID());
|
||||
c->SendAppearancePacket(AT_Anim, ANIM_STAND);
|
||||
c->Message(Chat::White, "It is recorded you have agreed to the rules.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user