Advertisement
Shiny_

Untitled

May 15th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.53 KB | None | 0 0
  1. require "cinch"
  2.  
  3. FAMINA__REGEX   = /\bfamina?\b/i
  4. NICK_BOTA       = "Luklux_Clan"
  5. WORD__REGEX     = /\bs(l|ł)owo?\b/i
  6. TABLICA         = ["Słowo 1", "Słowo 2", "Słowo 3"]
  7.  
  8. bot = Cinch::Bot.new do
  9.     configure do |c|
  10.         c.server    = "irc.pirc.pl"
  11.         c.channels  = ["#wykoppl"]
  12.         c.nick      = NICK_BOTA
  13.     end
  14.  
  15.     on :join do |m|
  16.         bot.irc.send "MODE " + NICK_BOTA + " +B"
  17.     end
  18.  
  19.     on :message, FAMINA__REGEX do |m|
  20.         m.reply "Proszę, nie mówcie o niej :("
  21.     end
  22.    
  23.     on :message, WORD__REGEX do |m|
  24.         m.reply TABLICA.sample
  25.     end
  26. end
  27. bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement