Fix for mrelay - some bots are sending malformed messages, caused by wrong usage of their modules.
Accessing an external service through the bot for gathering tower data is nolonger supported; and should be done via external scripts. Fix for callers, and missing alias'es for loot tables. !accounts will only show mains now. the character order of all alt lists has been reversed: [main] high => low instead of [main] low => high !account add <name> also marks accounts as type 0, if an account gets re-enabled. might cause strange behaviour with member-logs, if used in onlinebots. Member type is being displayed in !account now. [Member (X)]
This commit is contained in:
@@ -155,7 +155,7 @@ class AccountService:
|
||||
def get_alts(self, char_id) -> List[DictObject]:
|
||||
return self.db.query(
|
||||
"SELECT p.*, a.* from account a left join player p on a.char_id = p.char_id where "
|
||||
"main=(SELECT main from account where char_id=?) ORDER BY a.main = a.char_id desc, p.level, p.name DESC",
|
||||
"main=(SELECT main from account where char_id=?) ORDER BY a.main = a.char_id desc, p.level desc, p.name DESC",
|
||||
[char_id])
|
||||
|
||||
acc_cache = {}
|
||||
@@ -377,6 +377,11 @@ class AccountService:
|
||||
"UPDATE account set disabled=0 where main in (SELECT main from account where char_id=?)",
|
||||
[char_id]) else False
|
||||
|
||||
def account_add_member(self, char_id) -> bool:
|
||||
return True if self.db.exec(
|
||||
"UPDATE account set member=0 where main in (SELECT main from account where char_id=?)",
|
||||
[char_id]) else False
|
||||
|
||||
def remove_members(self, users) -> None:
|
||||
if type(users) == list and len(users) > 0:
|
||||
with self.db.pool.get_connection() as conn:
|
||||
|
||||
Reference in New Issue
Block a user