summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
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);