summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-26 20:15:29 -0400
committerJune McEnroe <june@causal.agency>2019-10-26 20:15:29 -0400
commit77426b0f3e2700fba2fb1011c5096c9b0a7916c1 (patch)
tree12d84bc14082bab96e855f8aef2c46cb8f4f4923 /bounce.c
parentDo not require RPL_ISUPPORT for stateReady (diff)
downloadpounce-77426b0f3e2700fba2fb1011c5096c9b0a7916c1.tar.gz
pounce-77426b0f3e2700fba2fb1011c5096c9b0a7916c1.zip
Add undocumented flag to disable verification
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bounce.c b/bounce.c
index 0c2d1d7..703c566 100644
--- a/bounce.c
+++ b/bounce.c
@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) {
 	char certPath[PATH_MAX] = "";
 	char privPath[PATH_MAX] = "";
 
+	bool insecure = false;
 	const char *host = NULL;
 	const char *port = "6697";
 	const char *pass = NULL;
@@ -101,8 +102,9 @@ int main(int argc, char *argv[]) {
 	const char *away = "pounced :3";
 
 	int opt;
-	while (0 < (opt = getopt(argc, argv, "A:C:H:K:NP:W:a:h:j:n:p:r:u:vw:"))) {
+	while (0 < (opt = getopt(argc, argv, "!A:C:H:K:NP:W:a:h:j:n:p:r:u:vw:"))) {
 		switch (opt) {
+			break; case '!': insecure = true;
 			break; case 'A': away = optarg;
 			break; case 'C': strlcpy(certPath, optarg, sizeof(certPath));
 			break; case 'H': localHost = optarg;
@@ -143,7 +145,7 @@ int main(int argc, char *argv[]) {
 	int bind[8];
 	size_t binds = listenBind(bind, 8, localHost, localPort);
 
-	int server = serverConnect(host, port);
+	int server = serverConnect(insecure, host, port);
 	serverLogin(pass, auth, nick, user, real);
 	while (!stateReady()) serverRecv();
 	if (join) serverFormat("JOIN :%s\r\n", join);