Skip to content
This repository was archived by the owner on Oct 28, 2023. It is now read-only.

Commit 5fd22e7

Browse files
committed
Add switch for balance ranking
1 parent 5867a1b commit 5fd22e7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

LLMoney/LLMoney.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ using namespace RegisterCommandHelper;
1313

1414
Logger logger("LLMoney");
1515
std::string LANGUAGE = "en-us";
16-
1716
double MoneyFee;
17+
bool EnableRanking;
1818

1919
bool initDB();
2020

@@ -68,6 +68,11 @@ class MoneyCommand : public Command {
6868
return;
6969
}
7070
break;
71+
case top:
72+
if (!EnableRanking) {
73+
outp.error("Balance ranking not enabled");
74+
return;
75+
}
7176
}
7277
switch (op) {
7378
case query:
@@ -335,6 +340,7 @@ void entry() {
335340
jr.bind("language", LANGUAGE);
336341
jr.bind("def_money", defmoney, 0);
337342
jr.bind("pay_tax", MoneyFee, .0);
343+
jr.bind("enable_ranking", EnableRanking, true);
338344
DEF_MONEY = defmoney;
339345
}
340346
catch (string e) {

0 commit comments

Comments
 (0)