return @nick.has_irc_glob? || @user.has_irc_glob? || @host.has_irc_glob?\r
end\r
\r
+ def generalize\r
+ u = user.dup\r
+ unless u.has_irc_glob?\r
+ u.sub!(/^[in]=/, '=') or u.sub!(/^\W(\w+)/, '\1')\r
+ u = '*' + u\r
+ end\r
+\r
+ h = host.dup\r
+ unless h.has_irc_glob?\r
+ if h.include? '/'\r
+ h.sub!(/x-\w+$/, 'x-*')\r
+ else\r
+ h.match(/^[^\.]+\.[^\.]+$/) or\r
+ h.sub!(/^(\d+\.\d+\.\d+\.)\d+$/, '\1*') or\r
+ h.sub!(/^[^\.]+\./, '*.')\r
+ end\r
+ end\r
+ return Netmask.new("*!#{u}@#{h}", server_and_casemap)\r
+ end\r
+\r
# This method is used to match the current Netmask against another one\r
#\r
# The method returns true if each component of the receiver matches the\r