Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player < GatherPlugin
- attr_accessor :nick, :mode, :points
- def initialize(options = {})
- @level = 1
- @nick = options[:nick]
- @hostmask = options[:hostmask]
- @username = options[:username]
- @password = options[:password].to_s
- @email = options[:email]
- @points = 1000
- @mode = ""
- end
- # this place is not what i need :). It should return player class with found results or smth like that.
- # maybe someone can help me... This class overall layout may be really false ;)
- def self.find(source)
- key, value = YAML::load_file(PLAYERLIST).find { |key, value| value['hostmask'] == source.hostmask }
- # if value is a Hash: value ? new(value) : nil
- return value
- end
- end
Add Comment
Please, Sign In to add comment