class Stats
Constants
- STYLE_TITLE
Public Class Methods
Source
# File plugins/stats.rb, line 21 def self.report(network:, channel:, store: RabbotDb) top = ChannelStats.top_nicks(network: network, channel: channel, store: store) busiest = ChannelStats.busiest_hour(network: network, channel: channel, store: store) header = IrcFormat.report_header(tag: "STATS", title: channel, style: STYLE_TITLE) body = ChannelStats.format_stats_report(top_nicks: top, busiest_hour: busiest) footer = IrcFormat.report_footer("channel activity") [header, body, footer].join("\n") end
Public Instance Methods
Source
# File plugins/stats.rb, line 30 def execute(m) unless m.channel m.reply "Use !stats in a channel" return end themed_flood_safe_reply(m, self.class.report(network: bot.config.server, channel: m.channel.name)) end