Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_relative 'Mercury/Core'
- account_file = "#{File.dirname(__FILE__)}/accounts.txt"
- phrase_file = "#{File.dirname(__FILE__)}/phrases.txt"
- penguins = []
- if(File.exists?(account_file))
- accounts = File.open(account_file,"r").read
- else
- puts "Please put accounts.txt in the same folder this script is in!"
- exit
- end
- if(File.exists?(phrase_file))
- phrases = File.open(phrase_file,"r").read
- else
- puts "Please put phrases.txt in the same folder this script is in!"
- exut
- end
- if(accounts === "")
- puts "Accounts file empty, please fill accounts\nwith penguins in this format USERNAME:PASSWORD:SERVER"
- exit
- else
- accounts = accounts.split("\n")
- end
- phrases = phrases.split("\n")
- def do_shit(name,phrases)
- name = name.split(":")
- penguin = Mercury.new()
- penguin.login(name[0],name[1],name[2])
- 2.times do
- penguin.room(name[3])
- end
- while true
- phrases.count.times do |x|
- penguin.rest(3)
- penguin.chat(phrases[x])
- end
- end
- end
- threads = []
- accounts.count.times do |x|
- threads.push(Thread.new{do_shit(accounts[x],phrases)})
- end
- accounts.count.times do |x|
- threads[x].join
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement