summaryrefslogtreecommitdiff
path: root/lib/std/dialparse+posixy.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/dialparse+posixy.myr')
-rw-r--r--lib/std/dialparse+posixy.myr11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/std/dialparse+posixy.myr b/lib/std/dialparse+posixy.myr
index 2d0a695..be68b9f 100644
--- a/lib/std/dialparse+posixy.myr
+++ b/lib/std/dialparse+posixy.myr
@@ -3,13 +3,14 @@ use "chartype"
use "hasprefix"
use "intparse"
use "slcp"
-use "sleq"
use "strfind"
use "striter"
use "option"
use "result"
use "ipparse"
use "resolve"
+use "traits"
+use "hashfuncs"
pkg std =
pkglocal const parseport : (port : byte[:] -> option(uint16))
@@ -22,13 +23,13 @@ const parseport = {port
| `Some n: -> `Some n
| `None:
/* a small number of hardcoded ports */
- if sleq(port, "http")
+ if eq(port, "http")
-> `Some 80
- elif sleq(port, "https")
+ elif eq(port, "https")
-> `Some 443
- elif sleq(port, "ircd")
+ elif eq(port, "ircd")
-> `Some 6667
- elif sleq(port, "dns")
+ elif eq(port, "dns")
-> `Some 53
;;
;;