Class: Motd
- Inherits:
-
Object
- Object
- Motd
- Includes:
- Muzang::Plugins::Helpers
- Defined in:
- lib/muzang-plugins/muzang-motd.rb
Instance Method Summary collapse
- #call(connection, message) ⇒ Object
-
#initialize(bot) ⇒ Motd
constructor
A new instance of Motd.
- #plugins ⇒ Object
Methods included from Muzang::Plugins::Helpers
#create_database, #match, #on_channel, #on_join
Constructor Details
#initialize(bot) ⇒ Motd
Returns a new instance of Motd.
6 7 8 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 6 def initialize(bot) @bot = bot end |
Instance Method Details
#call(connection, message) ⇒ Object
10 11 12 13 14 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 10 def call(connection, ) on_join(connection, ) do connection.msg(.channel, "Muzang | Version: #{Muzang::VERSION} | Plugins: #{plugins}") end end |
#plugins ⇒ Object
16 17 18 19 20 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 16 def plugins list = "" @bot.plugins.each{|plugin, instance| list << "*#{plugin}* "} list end |