Advertisement
Shiny_

Untitled

May 15th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.37 KB | None | 0 0
  1. require "cinch"
  2.  
  3. HOP_REGEX       = /^!hop?/i
  4. FAMINA__REGEX   = /\bfamina?\b/i
  5. ADMIN           = "NICK ADMINISTRATORA"
  6. NICK_BOTA       = "NICK BOTA"
  7. WORD__REGEX     = /\bs(l|ł)owo?\b/i
  8. EUROWIZJA_CAT   = /\be(u|l|ł)rowiz(i|j)a?\b/i
  9. TECHNO_CAT      = /^!te(h|ch)no?/i
  10. TECHNO_CAT_LINK = "https://www.youtube.com/watch?v=v9_2l6gBlCA"
  11. SAY_REGEX       = /\Asay (?<msg>.*)\z/i
  12. CHANNEL_NAME    = "#wykoppl"
  13. PASSWORD        = "HASŁO"
  14. TABLICA         = "kurwy"#["chuje", "kurwy", "dziwki"]
  15.  
  16. bot = Cinch::Bot.new do
  17.     configure do |c|
  18.         c.server    = "irc.pirc.pl"
  19.         c.port      = 6667
  20.         c.channels  = [CHANNEL_NAME] #, "#mirkofm"]
  21.         c.nick      = NICK_BOTA
  22.         c.password  = PASSWORD
  23.     end
  24.  
  25.     on :join do |m|
  26.         bot.irc.send "MODE " + NICK_BOTA + " +B"
  27.         if m.user.to_s.downcase == NICK_BOTA.downcase
  28.             bot.Channel(CHANNEL_NAME).send("WITAM WSZYSTKIE POLSKIE #{TABLICA.upcase}!")
  29.         end
  30.     end
  31.  
  32.     on :message, FAMINA__REGEX do |m|
  33.         m.reply "Famina to ciota i chuj."
  34.     end
  35.    
  36.     on :message, EUROWIZJA_CAT do |m|
  37.         m.reply "https://www.youtube.com/watch?feature=player_embedded&v=Q4YkShSUSiE"
  38.     end
  39.    
  40.     on :message, TECHNO_CAT do |m|
  41.         m.reply TECHNO_CAT_LINK
  42.     end
  43.    
  44.     on :message, SAY_REGEX do |m|
  45.         if m.user.to_s.downcase == ADMIN.downcase
  46.             msg = SAY_REGEX.match(m.message)[:msg]
  47.             bot.Channel(CHANNEL_NAME).msg msg
  48.         end
  49.     end
  50.    
  51.     on :message, HOP_REGEX do |m|
  52.         m.reply "sam se kurna skacz"
  53.     end
  54. end
  55. bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement