Class: Admin::Oper
- Inherits:
-
Object
- Object
- Admin::Oper
- Includes:
- Cinch::Helpers, Cinch::Plugin
- Defined in:
- lib/Zeta/admin/oper.rb
Instance Method Summary collapse
- #oper_clearchan(m, chan, confirm = false) ⇒ Object
- #oper_kill(m, nick, message) ⇒ Object
-
#oper_up(m) ⇒ Object
Methods.
Methods included from Cinch::Plugin
Instance Method Details
#oper_clearchan(m, chan, confirm = false) ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/Zeta/admin/oper.rb', line 28 def oper_clearchan(m, chan, confirm=false) if confirm == 'yes' || confirm == 'true' Channel(chan).join User('OperServ').send("mode #{chan} +o #{Zeta}") User('OperServ').send("mode #{chan} +mi") Channel(chan).send('This channel is being cleared') number_killed = 0 Channel(chan).users.each_key do |u| if u != Zeta number_killed += 1 @bot.irc.send("KILL #{u.nick} This channel is being cleared") end end m.safe_reply "#{chan} has been cleared, #{number_killed} clients killed" end end |
#oper_kill(m, nick, message) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/Zeta/admin/oper.rb', line 21 def oper_kill(m, nick, ) return if User(nick).oper? if @bot.irc.send("KILL #{nick} #{}") m.reply "#{nick}: has been killed by #{m.user.nick} for #{}" end end |