|
|
@ -99,18 +99,20 @@ logbot @uptime: To check how long @logbot has been around |
|
|
|
|
|
|
|
def group(self, message): |
|
|
|
|
|
|
|
# create a folder + database item |
|
|
|
# for each of the rooms in which |
|
|
|
# create a folder + database item |
|
|
|
# for each of the rooms in which |
|
|
|
# logbot is hanging around :) |
|
|
|
if not message.room in self.db.keys(): |
|
|
|
self.db[message.room] = {} |
|
|
|
self.db[message.room]['messages'] = {} |
|
|
|
self.db[message.room]['title'] = message.room |
|
|
|
if not os.path.isdir(message.room): |
|
|
|
os.mkdir(message.room) |
|
|
|
shutil.copy('stylesheet.css', message.room) |
|
|
|
output_path = os.path.join(server, message.room) |
|
|
|
if not os.path.isdir(output_path): |
|
|
|
os.mkdir(output_path) |
|
|
|
print('This folder is created:', output_path) |
|
|
|
shutil.copy('stylesheet.css', output_path) |
|
|
|
else: |
|
|
|
print('WARNING! This folder already exists:', message.room) |
|
|
|
print('WARNING! This folder already exists:', output_path) |
|
|
|
|
|
|
|
# to debug in the terminal |
|
|
|
print('------------------') |
|
|
|