Changed the string formatter from % to f"",
Fixed a bug related to logging [log dir does not exist on master, and needs to get created on first startup] Added !prefadmin <user> to view preferences of players, and change them Orgrank & name will be hidden in !alts, if the character is not in an org Page prefix & suffix are now being relayed [for example, it affects !online Fixed !perks Added comments regarding external API's.
This commit is contained in:
+3
-3
@@ -22,12 +22,12 @@ class Logger:
|
||||
|
||||
def log_chat(self, conn_id, channel, sender, msg):
|
||||
if sender:
|
||||
self.info("(%s) [%s] %s: %s" % (conn_id, channel, sender, self.format_chat_message(msg)))
|
||||
self.info(f"({conn_id}) [{channel}] {sender}: {self.format_chat_message(msg)}")
|
||||
else:
|
||||
self.info("(%s) [%s] %s" % (conn_id, channel, self.format_chat_message(msg)))
|
||||
self.info(f"({conn_id}) [{channel}] {self.format_chat_message(msg)}")
|
||||
|
||||
def log_tell(self, conn_id, direction, sender, msg):
|
||||
self.info("(%s) %s %s: %s" % (conn_id, direction.capitalize(), sender, self.format_chat_message(msg)))
|
||||
self.info(f"({conn_id}) {direction.capitalize()} {sender}: {self.format_chat_message(msg)}")
|
||||
|
||||
def format_chat_message(self, msg):
|
||||
msg = re.sub(r"<a\s+href=\".+?[^\\]\">", "[link]", msg, flags=re.UNICODE | re.DOTALL)
|
||||
|
||||
Reference in New Issue
Block a user