Class: Admin::Bot
- Inherits:
-
Object
- Object
- Admin::Bot
- Includes:
- Cinch::Helpers, Cinch::Plugin
- Defined in:
- lib/Zeta/admin/bot.rb
Instance Method Summary collapse
Methods included from Cinch::Plugin
Instance Method Details
#mode(m, nick) ⇒ Object
26 27 28 |
# File 'lib/Zeta/admin/bot.rb', line 26 def mode(m, nick) bot.modes = m end |
#nick(m, nick) ⇒ Object
Methods
19 20 21 22 23 24 |
# File 'lib/Zeta/admin/bot.rb', line 19 def nick(m, nick) bot.nick = nick synchronize(:nickchange) do @bot.handlers.dispatch :admin, m, "My nick got changed from #{@bot.last_nick} to #{@bot.nick} by #{m.user.nick}", m.target end end |
#quit(m, msg = nil) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/Zeta/admin/bot.rb', line 30 def quit(m, msg=nil) msg ||= m.user.nick @bot.handlers.dispatch :admin, m, "I am being shut down NOW!#{" - Reason: " + msg unless msg.nil?}", m.target sleep 2 bot.quit(msg) end |