/usr/lib/ruby/vendor_ruby/net/irc/message/serverconfig.rb is in ruby-net-irc 0.0.9-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | class Net::IRC::Message::ServerConfig
attr_reader :mode_parser
def initialize
@config = {}
@mode_parser = Net::IRC::Message::ModeParser.new
end
def set(arg)
params = arg.kind_of?(Net::IRC::Message) ? arg.to_a : arg.split(" ")
params[1..-1].each do |s|
case s
when /\A:?are supported by this server\z/
# Ignore
when /\A([^=]+)=(.*)\z/
key = Regexp.last_match[1].to_sym
value = Regexp.last_match[2]
@config[key] = value
@mode_parser.set(key, value) if key == :CHANMODES || key == :PREFIX
else
@config[s] = true
end
end
end
def [](key)
@config[key]
end
end
|