Add a couple of debug log messages to wordbot when a new round is started/finished
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -282,6 +282,7 @@ class Wordbot(Plugin):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def start_round(self, channel: str, allow_early_end: bool = False):
|
def start_round(self, channel: str, allow_early_end: bool = False):
|
||||||
|
log.debug("Starting new wordbot round for %s", channel)
|
||||||
# Choose words for new round
|
# Choose words for new round
|
||||||
with open(self.words_path) as fp:
|
with open(self.words_path) as fp:
|
||||||
words = [word.strip() for word in fp]
|
words = [word.strip() for word in fp]
|
||||||
@@ -290,6 +291,7 @@ class Wordbot(Plugin):
|
|||||||
self.db.start_round(channel, self.duration, words, allow_early_end)
|
self.db.start_round(channel, self.duration, words, allow_early_end)
|
||||||
|
|
||||||
def end_round(self, conn: IrcProtocol, channel: str):
|
def end_round(self, conn: IrcProtocol, channel: str):
|
||||||
|
log.debug("Ending wordbot round for %s", channel)
|
||||||
# Sort the scores
|
# Sort the scores
|
||||||
scores = sorted(self.db.scores(channel).items(), key=lambda value: -value[1])
|
scores = sorted(self.db.scores(channel).items(), key=lambda value: -value[1])
|
||||||
# Add their ordering
|
# Add their ordering
|
||||||
|
|||||||
Reference in New Issue
Block a user