Class: Artaius::Plugins::Autovoicer
- Inherits:
-
Object
- Object
- Artaius::Plugins::Autovoicer
- Includes:
- Cinch::Plugin
- Defined in:
- lib/artaius/plugins/autovoicer.rb
Overview
Gives a voice for everyone, who has a premium account in King Arthur’s Gold and registered.
Instance Method Summary collapse
Instance Method Details
#listen(m) ⇒ Object
10 11 12 13 14 |
# File 'lib/artaius/plugins/autovoicer.rb', line 10 def listen(m) return if m.user.nick == bot.nick m.channel.voice(m.user) if premium?(m.user.authname) end |
#premium?(irc_authname) ⇒ Boolean
16 17 18 |
# File 'lib/artaius/plugins/autovoicer.rb', line 16 def premium?(irc_authname) Player.filter(:irc_authname => irc_authname).select_map(:premium).first end |