Class | Net::IRC::Message::ServerConfig |
In: |
lib/net/irc/message/serverconfig.rb
|
Parent: | Object |
mode_parser | [R] |
# File lib/net/irc/message/serverconfig.rb, line 4 4: def initialize 5: @config = {} 6: @mode_parser = Net::IRC::Message::ModeParser.new 7: end
# File lib/net/irc/message/serverconfig.rb, line 9 9: def set(arg) 10: params = arg.kind_of?(Net::IRC::Message) ? arg.to_a : arg.split(" ") 11: 12: params[1..-1].each do |s| 13: case s 14: when /\A:?are supported by this server\z/ 15: # Ignore 16: when /\A([^=]+)=(.*)\z/ 17: key = Regexp.last_match[1].to_sym 18: value = Regexp.last_match[2] 19: @config[key] = value 20: @mode_parser.set(key, value) if key == :CHANMODES || key == :PREFIX 21: else 22: @config[s] = true 23: end 24: end 25: end