Guest User

Untitled

a guest
Apr 11th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. class Player < GatherPlugin
  2.  
  3. attr_accessor :nick, :mode, :points
  4.  
  5. def initialize(options = {})
  6. @level = 1
  7. @nick = options[:nick]
  8. @hostmask = options[:hostmask]
  9. @username = options[:username]
  10. @password = options[:password].to_s
  11. @email = options[:email]
  12. @points = 1000
  13. @mode = ""
  14. end
  15.  
  16. # this place is not what i need :). It should return player class with found results or smth like that.
  17. # maybe someone can help me... This class overall layout may be really false ;)
  18. def self.find(source)
  19. p = YAML::load_file(PLAYERLIST)
  20. p.each do |key, value|
  21. if value['hostmask'] == source.hostmask
  22. return value
  23. end
  24. end
  25. end
  26.  
  27. end
Add Comment
Please, Sign In to add comment