about summary refs log tree commit diff
path: root/main.c
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2026-01-10 16:32:54 +0300
committerNakidai <nakidai@disroot.org>2026-01-10 16:32:54 +0300
commit76e2c978829bc6ff7bfe6c49bfa3739e19370990 (patch)
tree07851d4ee5ca107ce4ec18889b20c006f56f53d3 /main.c
parent346abf24c900a19a77a8ce66566a7ffd86a819bb (diff)
downloadlibreircd-76e2c978829bc6ff7bfe6c49bfa3739e19370990.tar.gz
libreircd-76e2c978829bc6ff7bfe6c49bfa3739e19370990.zip
Add basic user mode handling
So, now there're all modes listed in RFC 2812. The only what they
do now, though, is a +r restricting user from changing their nick
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index c93a84d..26de6e6 100644
--- a/main.c
+++ b/main.c
@@ -16,6 +16,7 @@
 
 #include "ircd.h"
 
+#include <errno.h>
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -38,7 +39,7 @@ main(int argc, char **argv)
 	hostname = argv[1];
 	host = argv[2];
 	port = strtoul(argv[3], &p, 10);
-	if (*p || !port || port > 65535)
+	if (errno || *p || !port || port > 65535)
 		errx(1, "invalid port");
 
 #ifdef __OpenBSD__