Class: Muzang::Plugins::Motd
- Inherits:
-
Object
- Object
- Muzang::Plugins::Motd
- Includes:
- 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 Helpers
#create_database, #match, #on_channel, #on_join
Constructor Details
#initialize(bot) ⇒ Motd
Returns a new instance of Motd.
8 9 10 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 8 def initialize(bot) @bot = bot end |
Instance Method Details
#call(connection, message) ⇒ Object
12 13 14 15 16 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 12 def call(connection, ) on_join(connection, ) do connection.msg(.channel, "Muzang | Version: #{Muzang::VERSION} | Plugins: #{plugins}") end end |
#plugins ⇒ Object
18 19 20 21 22 |
# File 'lib/muzang-plugins/muzang-motd.rb', line 18 def plugins list = "" @bot.plugins.each{|plugin, instance| list << "*#{plugin}* "} list end |