summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-01 02:26:35 -0500
committerJune McEnroe <june@causal.agency>2020-02-01 02:26:35 -0500
commit2b3a8bfb9c022269307feed01419c903ba754508 (patch)
tree67f588e8b1abe4563af08fa6ab92a528d74cdca0 /chat.c
parentFix CapNames array indices (diff)
downloadcatgirl-2b3a8bfb9c022269307feed01419c903ba754508.tar.gz
catgirl-2b3a8bfb9c022269307feed01419c903ba754508.zip
Add -v flag
Diffstat (limited to '')
-rw-r--r--chat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/chat.c b/chat.c
index 89579c0..5796085 100644
--- a/chat.c
+++ b/chat.c
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
 	const char *real = NULL;
 
 	int opt;
-	while (0 < (opt = getopt(argc, argv, "!a:c:eh:j:k:n:p:r:u:w:"))) {
+	while (0 < (opt = getopt(argc, argv, "!a:c:eh:j:k:n:p:r:u:vw:"))) {
 		switch (opt) {
 			break; case '!': insecure = true;
 			break; case 'a': sasl = true; self.plain = optarg;
@@ -52,6 +52,7 @@ int main(int argc, char *argv[]) {
 			break; case 'p': port = optarg;
 			break; case 'r': real = optarg;
 			break; case 'u': user = optarg;
+			break; case 'v': self.debug = true;
 			break; case 'w': pass = optarg;
 		}
 	}
@@ -70,4 +71,8 @@ int main(int argc, char *argv[]) {
 	ircFormat("CAP LS\r\n");
 	ircFormat("NICK :%s\r\n", nick);
 	ircFormat("USER %s 0 * :%s\r\n", user, real);
+
+	for (;;) {
+		ircRecv();
+	}
 }