Guest User

Untitled

a guest
Apr 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. %w{ rubygems IRC }.each { |r| require r }
  3.  
  4. nick = 'SpankyBot'
  5. server = 'irc.freenode.net'
  6. port = '6667'
  7. realname = nick
  8. channels = %w{ #omglolserbar }
  9.  
  10. bot = IRC.new(nick, server, port, realname)
  11. IRCEvent.add_callback 'endofmotd' do |event|
  12. channels.each { |c| bot.add_channel c }
  13. end
  14. IRCEvent.add_callback 'join' do |event|
  15. bot.send_action event.channel.to_s, 'dances like a monkey'
  16. end
  17.  
  18. bot.connect
Add Comment
Please, Sign In to add comment