aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-08-01 09:07:38 +0200
committerPřemysl Janouch <p@janouch.name>2018-08-01 09:16:45 +0200
commit3c47e5b354d36dc4c9117ca5063fa801d32e449f (patch)
tree5d89bdd52cd751055f6fa543d5d0aa6165ad8b0b
parent54d34061756e8fe600063eff5cb98377cbfe1ec9 (diff)
downloadxK-3c47e5b354d36dc4c9117ca5063fa801d32e449f.tar.gz
xK-3c47e5b354d36dc4c9117ca5063fa801d32e449f.tar.xz
xK-3c47e5b354d36dc4c9117ca5063fa801d32e449f.zip
kike: fix grammar in hostname validation
This has an entry in RFC 2812 errata, although it's held for document update. We can afford the strictness.
-rw-r--r--kike.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kike.c b/kike.c
index 0bcec60..a09e62c 100644
--- a/kike.c
+++ b/kike.c
@@ -194,7 +194,8 @@ irc_validate_to_str (enum validation_result result)
}
// Anything to keep it as short as possible
-#define SN "[0-9A-Za-z][-0-9A-Za-z]*[0-9A-Za-z]*"
+// "shortname" from RFC 2812 doesn't work how its author thought it would.
+#define SN "[0-9A-Za-z](-*[0-9A-Za-z])*"
#define N4 "[0-9]{1,3}"
#define N6 "[0-9ABCDEFabcdef]{1,}"