mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Rules] Add World:Rules Rule (#4194)
* [Rules] Add World:Rules Rule # Notes - Adds `World:Rules` rule to take the place of the variables table value. * Update client.cpp * Update client.cpp
This commit is contained in:
parent
e4157f0221
commit
8826d7b927
@ -329,6 +329,7 @@ RULE_BOOL(World, UseItemLinksForKeyRing, false, "Uses item links for Key Ring Li
|
||||
RULE_BOOL(World, UseOldShadowKnightClassExport, true, "Disable to have Shadowknight show as Shadow Knight (live-like)")
|
||||
RULE_STRING(World, IPExemptionZones, "", "Comma-delimited list of zones to exclude from IP-limit checks. Empty string to disable.")
|
||||
RULE_STRING(World, MOTD, "", "Server MOTD sent on login, change from empty to have this be used instead of variables table 'motd' value")
|
||||
RULE_STRING(World, Rules, "", "Server Rules, change from empty to have this be used instead of variables table 'rules' value, lines are pipe (|) separated, example: A|B|C")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Zone)
|
||||
|
||||
@ -3786,14 +3786,12 @@ void Client::GetRaidAAs(RaidLeadershipAA_Struct *into) const {
|
||||
|
||||
void Client::EnteringMessages(Client* client)
|
||||
{
|
||||
std::string rules;
|
||||
if (database.GetVariable("Rules", rules)) {
|
||||
uint8 flag = database.GetAgreementFlag(client->AccountID());
|
||||
std::string rules = RuleS(World, Rules);
|
||||
|
||||
if (!rules.empty() || database.GetVariable("Rules", rules)) {
|
||||
const uint8 flag = database.GetAgreementFlag(client->AccountID());
|
||||
if (!flag) {
|
||||
auto rules_link = Saylink::Silent(
|
||||
"#serverrules",
|
||||
"rules"
|
||||
);
|
||||
const std::string& rules_link = Saylink::Silent("#serverrules", "rules");
|
||||
|
||||
client->Message(
|
||||
Chat::White,
|
||||
@ -3810,9 +3808,9 @@ void Client::EnteringMessages(Client* client)
|
||||
|
||||
void Client::SendRules()
|
||||
{
|
||||
std::string rules;
|
||||
std::string rules = RuleS(World, Rules);
|
||||
|
||||
if (!database.GetVariable("Rules", rules)) {
|
||||
if (rules.empty() && !database.GetVariable("Rules", rules)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user