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:
@@ -346,17 +346,17 @@ class TowerAttackController:
|
||||
def format_battle_info(self, row, t):
|
||||
blob = ""
|
||||
defeated = " - <notice>Defeated!</notice>" if row.is_finished else ""
|
||||
blob += "Site: <highlight>%s %s</highlight>\n" % (row.short_name, row.site_number or "?")
|
||||
blob += "Defender: <highlight>%s</highlight> (%s)%s\n" % (row.def_org_name, row.def_faction, defeated)
|
||||
blob += "Last Activity: %s\n" % self.format_timestamp(row.last_updated, t)
|
||||
blob += f"Site: <highlight>{row.short_name} {row.site_number or '?'}</highlight>\n"
|
||||
blob += f"Defender: <highlight>{row.def_org_name}</highlight> ({row.def_faction}){defeated}\n"
|
||||
blob += f"Last Activity: {self.format_timestamp(row.last_updated, t)}\n"
|
||||
return blob
|
||||
|
||||
def format_timestamp(self, t, current_t):
|
||||
return "<highlight>%s</highlight> (%s ago)" % (
|
||||
self.util.format_datetime(t), self.util.time_to_readable(current_t - t))
|
||||
return f"<highlight>{self.util.format_datetime(t)}</highlight> " \
|
||||
f"({self.util.time_to_readable(current_t - t)} ago)"
|
||||
|
||||
def get_chat_command(self, page):
|
||||
return "/tell <myname> attacks --page=%d" % page
|
||||
return f"/tell <myname> attacks --page={page}"
|
||||
|
||||
def check_for_all_towers_channel(self):
|
||||
if not self.public_channel_service.get_channel_name(TowerController.ALL_TOWERS_ID):
|
||||
|
||||
Reference in New Issue
Block a user