display channel count in the privmsg report
This commit is contained in:
parent
b21421a395
commit
0b3386e183
@ -93,19 +93,21 @@ class History(Plugin):
|
||||
logger.debug("<%s> %s is asking for an update", who, most_specific_message(event))
|
||||
if event.in_privmsg:
|
||||
total_history = []
|
||||
channel_count = 0
|
||||
for channel in self.channel_leave_points.keys():
|
||||
logger.debug("checking history slice for %s", channel)
|
||||
total_history += self._missed_slice(channel, who)
|
||||
logger.debug("total history so far: %s", total_history)
|
||||
channel_count += 1
|
||||
logger.debug("final missed history: %s", total_history)
|
||||
self._send_history(who, total_history)
|
||||
self.bot.reply(event, f"{len(total_history)} lines")
|
||||
self.bot.reply(event, f"{len(total_history)} line(s) over {channel_count} channel(s)")
|
||||
return 'NO MORE'
|
||||
else:
|
||||
where = event.target
|
||||
history = self._missed_slice(where, who)
|
||||
self._send_history(who, history)
|
||||
self.bot.reply(event, f"{len(history)} lines (PRIVMSGed)")
|
||||
self.bot.reply(event, f"{len(history)} line(s) (PRIVMSGed)")
|
||||
return 'NO MORE'
|
||||
|
||||
def _send_history(self, who, history):
|
||||
|
Loading…
Reference in New Issue
Block a user