summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-01 02:26:35 -0500
committerC. McEnroe2020-02-01 02:26:35 -0500
commit2b3a8bfb9c022269307feed01419c903ba754508 (patch)
tree67f588e8b1abe4563af08fa6ab92a528d74cdca0 /chat.c
parent856d40d1212ec835b092a8f275124d09a65ba59d (diff)
Add -v flag
Diffstat (limited to 'chat.c')
-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();
+	}
 }