self.full_irc_downcase\r
end\r
\r
+ # This method returns a new Netmask which is the fully downcased version\r
+ # of the receiver\r
+ def downcased\r
+ return self.full_downcase.to_irc_netmask(server_and_casemap)\r
+ end\r
+\r
# Converts the receiver into a Netmask with the given (optional)\r
# server/casemap association. We return self unless a conversion\r
# is needed (different casemap/server)\r
end
def mask2keys(m)
- [m.host, m.user, m.nick].map { |c| cook_component(c) }
+ md = m.downcased
+ [md.host, md.user, md.nick].map { |c| cook_component(c) }
end
def add(user, *masks)
def find(iu)
debug "find(#{iu.fullform})"
- matches = @tree.find(iu.host, iu.user, iu.nick).uniq.map do |val|
+ iud = iu.downcased
+ matches = @tree.find(iud.host, iud.user, iud.nick).uniq.map do |val|
m = metric(iu, *val)
m ? [val[0], m] : nil
end.compact.sort { |a, b| a[1] <=> a[1] }