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)
- p = YAML::load_file(PLAYERLIST)
- p.each do |key, value|
- if value['hostmask'] == source.hostmask
- return value
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment