Advertisement
Guest User

Untitled

a guest
Jan 30th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. require_relative 'Mercury/Core'
  2.  
  3. account_file = "#{File.dirname(__FILE__)}/accounts.txt"
  4. phrase_file = "#{File.dirname(__FILE__)}/phrases.txt"
  5.  
  6. penguins = []
  7. if(File.exists?(account_file))
  8. accounts = File.open(account_file,"r").read
  9. else
  10. puts "Please put accounts.txt in the same folder this script is in!"
  11. exit
  12. end
  13. if(File.exists?(phrase_file))
  14. phrases = File.open(phrase_file,"r").read
  15. else
  16. puts "Please put phrases.txt in the same folder this script is in!"
  17. exut
  18. end
  19.  
  20. if(accounts === "")
  21. puts "Accounts file empty, please fill accounts\nwith penguins in this format USERNAME:PASSWORD:SERVER"
  22. exit
  23. else
  24. accounts = accounts.split("\n")
  25. end
  26.  
  27. phrases = phrases.split("\n")
  28. def do_shit(name,phrases)
  29. name = name.split(":")
  30. penguin = Mercury.new()
  31. penguin.login(name[0],name[1],name[2])
  32. 2.times do
  33. penguin.room(name[3])
  34. end
  35. while true
  36. phrases.count.times do |x|
  37. penguin.rest(3)
  38. penguin.chat(phrases[x])
  39. end
  40. end
  41. end
  42.  
  43. threads = []
  44. accounts.count.times do |x|
  45. threads.push(Thread.new{do_shit(accounts[x],phrases)})
  46. end
  47. accounts.count.times do |x|
  48. threads[x].join
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement