Advertisement
Guest User

Untitled

a guest
Feb 17th, 2016
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. require 'zircon'
  2. require 'colorize'
  3.  
  4. client = Zircon.new(
  5. server: 'irc.twitch.tv',
  6. port: '6667',
  7. channel: '#admiralbulldog',
  8. username: 'username',
  9. password: 'oauth:your_token'
  10. )
  11.  
  12. removed_colors = [:black, :white, :light_black, :light_white]
  13. colors = String.colors - removed_colors
  14.  
  15. f = File.open('chat.txt', 'w')
  16.  
  17. client.on_message do |message|
  18. puts ">>> #{message.from}: #{message.body}".colorize(colors.sample)
  19. f.write(message.body.to_s + "\n")
  20. end
  21.  
  22. client.run!
  23. f.close
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement