about summary refs log tree commit diff
path: root/input.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-11-29 05:37:10 -0500
committerJune McEnroe <june@causal.agency>2018-11-29 05:40:26 -0500
commite4eb97e5126d5f100ac29a34e43afa6fb9f663e2 (patch)
treea335c82a326bad9aa33a6425c96cdd50539b7c5f /input.c
parentSet LIBRESSL_PREFIX in Darwin.mk (diff)
downloadtest-e4eb97e5126d5f100ac29a34e43afa6fb9f663e2.tar.gz
test-e4eb97e5126d5f100ac29a34e43afa6fb9f663e2.zip
Add /whois
Diffstat (limited to 'input.c')
-rw-r--r--input.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/input.c b/input.c
index 3a3d499..85c240f 100644
--- a/input.c
+++ b/input.c
@@ -87,6 +87,13 @@ static void inputWho(struct Tag tag, char *params) {
 	ircFmt("WHO %s\r\n", tag.name);
 }
 
+static void inputWhois(struct Tag tag, char *params) {
+	(void)tag;
+	char *nick = param("/whois", &params, "nick");
+	if (!nick) return;
+	ircFmt("WHOIS %s\r\n", nick);
+}
+
 static void inputTopic(struct Tag tag, char *params) {
 	if (params) {
 		ircFmt("TOPIC %s :%s\r\n", tag.name, params);
@@ -104,7 +111,7 @@ static void inputQuit(struct Tag tag, char *params) {
 	}
 }
 
-static void inputUrl(struct Tag tag, char *params) {
+static void inputURL(struct Tag tag, char *params) {
 	(void)params;
 	urlList(tag);
 }
@@ -163,9 +170,10 @@ static const struct {
 	{ "/query", inputQuery },
 	{ "/quit", inputQuit },
 	{ "/topic", inputTopic },
-	{ "/url", inputUrl },
+	{ "/url", inputURL },
 	{ "/view", inputView },
 	{ "/who", inputWho },
+	{ "/whois", inputWhois },
 };
 static const size_t CommandsLen = sizeof(Commands) / sizeof(Commands[0]);
 
46 -0400'>2018-09-13Fix weird tab-complete after commaJune McEnroe 2018-09-13Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe