class Userdata
Public Class Methods
Source
# File plugins/userdata.rb, line 18 def self.network_for(bot) bot.config.server end
Public Instance Methods
Source
# File plugins/userdata.rb, line 42 def on_action(m) return unless trackable?(m) RabbotDb.record_action( network: self.class.network_for(bot), channel: m.channel.name, nick: m.user.nick, text: m.action ) end
Source
# File plugins/userdata.rb, line 22 def on_message(m) return unless trackable?(m) RabbotDb.record_message( network: self.class.network_for(bot), channel: m.channel.name, nick: m.user.nick, text: m.message ) ChannelStats.increment( network: self.class.network_for(bot), channel: m.channel.name, nick: m.user.nick ) ChannelStats.record_hour( network: self.class.network_for(bot), channel: m.channel.name ) end
Source
# File plugins/userdata.rb, line 64 def on_part(m) return unless m.channel RabbotDb.record_part( network: self.class.network_for(bot), channel: m.channel.name, nick: m.user.nick, message: m.message ) end
Source
# File plugins/userdata.rb, line 53 def on_topic(m) return unless m.channel RabbotDb.record_topic( network: self.class.network_for(bot), channel: m.channel.name, nick: m.user.nick, topic: m.message ) end