All pastes #420209 Raw Edit

Untitled

public text v1 · immutable
·published 2007-04-01 23:24 UTC
rendered paste body
    def LoadConfig
        parameters = {'gamedir'=>'../../', 'gameexe'=>'crx', 'browser'=>'firefo$
        @config.clear # empty hash table
        file = open('browser.ini', 'r')
        file.each do
            |line|
            key = line.split('=')[0].chomp  # chomp removes any line feed prese$
            value = line.split('=')[1]
            if parameters.include?(key) and value != nil
                if value.chomp.length != 0
                    @config[key]=value.chomp
                end
            end
        end
        file.close