forked from varia/bots
adding a hacky line to parse room names if they are defined as their full muc address... (debugging the @folder feature)
This commit is contained in:
parent
433ee3f066
commit
75cac06439
@ -165,7 +165,7 @@ class Logbot(Bot):
|
||||
if "stylesheet" not in self.db[room]:
|
||||
self.db[room]["stylesheet"] = "timeline" # default stylesheet
|
||||
if "font" not in self.db[room]:
|
||||
self.db[room]["font"] = 'None' # default font
|
||||
self.db[room]["font"] = 'none' # default font
|
||||
self.db._dumps()
|
||||
self.log.info(f"Added to the database: { room }")
|
||||
|
||||
@ -240,6 +240,8 @@ class Logbot(Bot):
|
||||
match = re.findall("@folder .*", message.content)[0]
|
||||
newfoldername = match.replace("@folder ", "")
|
||||
currentfoldername = self.db[message.room]["folder"]
|
||||
if "@" in currentfoldername: # hacky
|
||||
currentfoldername = self._parse_room_name(currentfoldername)
|
||||
os.rename(currentfoldername, newfoldername)
|
||||
self.db[message.room]["folder"] = newfoldername
|
||||
reply = f"The foldername of the log is changed to: { newfoldername }. The URL of the log changed into: https://vvvvvvaria.org/logs/{ newfoldername}"
|
||||
|
Loading…
Reference in New Issue
Block a user