Guest User

Untitled

a guest
Aug 5th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. def initialize(options)
  2. @server = options[:server]
  3. @channel = options[:channel]
  4.  
  5. @port = options[:port] || 6667
  6.  
  7. @username = options[:username]
  8. @password = options[:password]
  9.  
  10. puts 'Initialising an IRCSocket.'
  11. options.each do |key, value|
  12. puts "#{key}: #{value}"
  13. end
  14.  
  15. @irc = TCPSocket.new(@server, @port)
  16.  
  17. connect
  18. end
  19. end
  20.  
  21. def connect
  22. irc_raw "USER blah blah blah :blah blah"
  23. irc_raw "NICK #{@username}"
  24. end
Add Comment
Please, Sign In to add comment