if self.class == Netmask\r
return self if fits_with_server_and_casemap?(opts)\r
end\r
- return self.fullform.to_irc_netmask(server_and_casemap.merge(opts))\r
+ return self.downcase.to_irc_netmask(opts)\r
end\r
\r
# Converts the receiver into a User with the given (optional)\r
end\r
end\r
\r
+ # Users can be either simply downcased (their nick only)\r
+ # or fully downcased: this will return the fullform downcased\r
+ # according to the given casemap.\r
+ #\r
+ def full_irc_downcase(cmap=casemap)\r
+ self.fullform.irc_downcase(cmap)\r
+ end\r
+\r
+ # full_downcase() will return the fullform downcased according to the\r
+ # User's own casemap\r
+ #\r
+ def full_downcase\r
+ self.full_irc_downcase\r
+ end\r
+\r
# Since to_irc_user runs the same checks on server and channel as\r
# to_irc_netmask, we just try that and return self if it works.\r
#\r
#\r
def to_irc_user(opts={})\r
return self if fits_with_server_and_casemap?(opts)\r
- return self.fullform.to_irc_user(server_and_casemap(opts))\r
+ return self.full_downcase.to_irc_user(opts)\r
end\r
\r
# We can replace everything at once with data from another User\r