\r
GEN_HOST = /#{HOSTNAME}|#{HOSTADDR}/\r
\r
- # FreeNode network replaces the host of affiliated users with\r
- # 'virtual hosts' \r
- # FIXME we need the true syntax to match it properly ...\r
- PDPC_HOST_PART = /[0-9A-Za-z.-]+/\r
- PDPC_HOST = /#{PDPC_HOST_PART}(?:\/#{PDPC_HOST_PART})+/\r
-\r
- # NOTE: the final optional and non-greedy dot is needed because some\r
- # servers (e.g. FreeNode) send the hostname of the services as "services."\r
- # which is not RFC compliant, but sadly done.\r
- GEN_MASK_HOST = /#{PDPC_HOST}|#{GEN_HOST}\.??/ \r
+ # # FreeNode network replaces the host of affiliated users with\r
+ # # 'virtual hosts' \r
+ # # FIXME we need the true syntax to match it properly ...\r
+ # PDPC_HOST_PART = /[0-9A-Za-z.-]+/\r
+ # PDPC_HOST = /#{PDPC_HOST_PART}(?:\/#{PDPC_HOST_PART})+/\r
+\r
+ # # NOTE: the final optional and non-greedy dot is needed because some\r
+ # # servers (e.g. FreeNode) send the hostname of the services as "services."\r
+ # # which is not RFC compliant, but sadly done.\r
+ # GEN_HOST_EXT = /#{PDPC_HOST}|#{GEN_HOST}\.??/ \r
+\r
+ # Sadly, different networks have different, RFC-breaking ways of cloaking\r
+ # the actualy host address: see above for an example to handle FreeNode.\r
+ # Another example would be Azzurra, wich also inserts a "=" in the\r
+ # cloacked host. So let's just not care about this and go with the simplest\r
+ # thing:\r
+ GEN_HOST_EXT = /\S+/\r
+\r
+ # User-matching Regexp\r
+ GEN_USER_ID = /(#{GEN_NICK})(?:(?:!(#{GEN_USER}))?@(#{GEN_HOST_EXT}))?/\r
+\r
+ # For Netmask, we want to allow wildcards * and ? in the nick\r
+ # (they are already allowed in the user and host part\r
+ GEN_NICK_MASK = /(?:#{NICK_FIRST}|[?*])?(?:#{NICK_ANY}|[?*])+/\r
\r
# Netmask-matching Regexp\r
- GEN_MASK = /(#{GEN_NICK})(?:(?:!(#{GEN_USER}))?@(#{GEN_MASK_HOST}))?/\r
+ GEN_MASK = /(#{GEN_NICK_MASK})(?:(?:!(#{GEN_USER}))?@(#{GEN_HOST_EXT}))?/\r
+\r
end\r
\r
end\r