SHARE
TWEET

Untitled

a guest Mar 5th, 2019 116 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. require 'active_record'
  2.  
  3. Dir[File.dirname(__FILE__) + '/Models/*.rb'].each {|file| require file }
  4.  
  5. #DBConnection
  6. ActiveRecord::Base.establish_connection(
  7. :adapter  => 'mysql2',
  8. :database => 'ircdb',
  9. :username => 'billbot',
  10. :password => 'm4a1ak47',
  11. :host     => '184.72.60.161')
  12. ActiveRecord::Base.default_timezone = :utc
  13.  
  14.  
  15. minutes = 10
  16. msgs = 2
  17.  
  18. @msgs = Message.find_all_by_hostname("The.Smallest.Of.Bills")
  19. count = @msgs.uniq{|x| x.nick}
  20.  
  21. results = "Known aliases for name "
  22.  
  23. count.each do |x|
  24.  results << "#{x.nick}, "
  25. end
  26. puts results.slice(0..-3)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top