Advertisement
ioangogo

Untitled

Aug 30th, 2014
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.47 KB | None | 0 0
  1. require 'cinch'
  2. require 'cinch-cooldown'
  3.  
  4. class Pingpong
  5.   include Cinch::Plugin
  6.   enforce_cooldown
  7.  
  8.   match "ping"
  9.  
  10.   def execute(m)
  11.     m.reply "Pong"
  12.     sleep(5)
  13.   end
  14. end
  15.  
  16. bot = Cinch::Bot.new do
  17.   configure do |c|
  18.     c.server = "irc.geekshed.net"
  19.     c.channels = ["#jb-test"]
  20.     c.nick = "Pingpong_Bot"
  21.     c.plugins.plugins = [Pingpong]
  22.     c.shared[:cooldown] = { :config => { '#jb-test' => { :global => 10 :user => 20 } } }
  23.   end
  24. end
  25.  
  26. bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement