summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-02 18:40:06 -0400
committerJune McEnroe <june@causal.agency>2019-07-02 18:40:06 -0400
commit906440968e658629a3722ebc8d8405cbbb7b4d1d (patch)
tree7555c879b99b4756d42bce475c53e1ed233f805c /handle.c
parentAdd optional key to /join (diff)
downloadcatgirl-906440968e658629a3722ebc8d8405cbbb7b4d1d.tar.gz
catgirl-906440968e658629a3722ebc8d8405cbbb7b4d1d.zip
Add -k option for joining with keys
Diffstat (limited to '')
-rw-r--r--handle.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/handle.c b/handle.c
index a46c149..4f9015c 100644
--- a/handle.c
+++ b/handle.c
@@ -138,7 +138,11 @@ static void handleReplyWelcome(char *prefix, char *params) {
 		self.nick = strdup(nick);
 		if (!self.nick) err(EX_OSERR, "strdup");
 	}
-	if (self.join) ircFmt("JOIN %s\r\n", self.join);
+	if (self.join && self.keys) {
+		ircFmt("JOIN %s %s\r\n", self.join, self.keys);
+	} else if (self.join) {
+		ircFmt("JOIN %s\r\n", self.join);
+	}
 	tabTouch(TagStatus, self.nick);
 
 	uiLog(TagStatus, UICold, L"You have arrived");
title='2019-10-24 00:26:53 -0400'>2019-10-24Make clientFormat publicJune McEnroe 2019-10-24Make serverFormat publicJune McEnroe 2019-10-24Rename some thingsJune McEnroe 2019-10-23Add ISUPPORT draft to STANDARDSJune McEnroe 2019-10-23Track own originJune McEnroe 2019-10-23Track channels and sync ISUPPORTJune McEnroe 2019-10-23Track nick changesJune McEnroe 2019-10-23Rename Command to MessageJune McEnroe 2019-10-23Synchronize state after client registrationJune McEnroe 2019-10-23Send to server if client has no needsJune McEnroe 2019-10-23Implement some amount of client connectionJune McEnroe 2019-10-23Set clients non-blockingJune McEnroe 2019-10-23Clean up state.c and factor out parsingJune McEnroe 2019-10-23Respond to pingsJune McEnroe 2019-10-23Add verbose flagJune McEnroe 2019-10-23Set NOSIGPIPE on server connectionJune McEnroe 2019-10-23Set an initial loop capJune McEnroe 2019-10-23Fix rest parsingJune McEnroe 2019-10-23Add dynamic poll listJune McEnroe 2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe 2019-10-23Clean up state somewhatJune McEnroe 2019-10-23Actually send the buffer...June McEnroe 2019-10-23Add stateJune McEnroe