def activity(self, irc, msg, args, source): """[[<network>/]<channel>] Shows the level of conversation in this channel (or <channel on <network>, if specified), excluding lines directed at thes bot. """ source = wvm.nctuple(source, irc.network, msg.args[0]) data = self._getstats(source) if not data: irc.error('Currently no data for this channel.') return stats = "{0}: {1} \\ {2}: {3} \\ {4}: {5}".format( ircutils.bold('Short-term'), wvm.progressbar(30.0 / data[1] * 100), ircutils.bold('Long-term'), wvm.progressbar(30.0 / data[2] * 100), ircutils.bold('Samples'), data[3], ) irc.reply(stats)
def idletimes(self, irc, msg, args, source): """[[<network>/]<channel>] Shows idle time averages. """ source = wvm.nctuple(source, irc.network, msg.args[0]) data = self._getstats(source) if not data: irc.error('Currently no data for this channel.') return stats = "{0}: {1} \\ {2}: {3} \\ {4}: {5} \\ {6}: {7}".format( ircutils.bold('Current'), wvm.secstostamp(data[0]), ircutils.bold('Short-term'), wvm.secstostamp(data[1]), ircutils.bold('Long-term'), wvm.secstostamp(data[2]), ircutils.bold('Samples'), data[3], ) irc.reply(stats)