about summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--handle.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/handle.c b/handle.c
index 35c1e5f..ae3dbfa 100644
--- a/handle.c
+++ b/handle.c
@@ -103,7 +103,7 @@ static void handlePing(char *prefix, char *params) {
 	ircFmt("PONG %s\r\n", params);
 }
 
-static void handleReplyErroneousNickname(char *prefix, char *params) {
+static void handleErrorErroneousNickname(char *prefix, char *params) {
 	char *mesg;
 	shift(prefix, NULL, NULL, NULL, params, 3, 0, NULL, NULL, &mesg);
 	uiFmt(TagStatus, UIHot, "You can't use that name here: \"%s\"", mesg);
@@ -140,7 +140,7 @@ static void handleReplyWhoisUser(char *prefix, char *params) {
 	whoisColor = formatColor(user);
 	uiFmt(
 		TagStatus, UIWarm,
-		"\3%d%s\3 is %s@%s \"%s\"",
+		"\3%d%s\3 is %s@%s, \"%s\"",
 		whoisColor, nick, user, host, real
 	);
 }
@@ -182,6 +182,12 @@ static void handleReplyWhoisChannels(char *prefix, char *params) {
 	uiFmt(TagStatus, UIWarm, "\3%d%s\3 is in %s", whoisColor, nick, chans);
 }
 
+static void handleErrorNoSuchNick(char *prefix, char *params) {
+	char *nick, *mesg;
+	shift(prefix, NULL, NULL, NULL, params, 3, 0, NULL, &nick, &mesg);
+	uiFmt(TagStatus, UIWarm, "%s, \"%s\"", mesg, nick);
+}
+
 static void handleJoin(char *prefix, char *params) {
 	char *nick, *user, *chan;
 	shift(prefix, &nick, &user, NULL, params, 1, 0, &chan);
@@ -464,8 +470,9 @@ static const struct {
 	{ "366", handleReplyEndOfNames },
 	{ "372", handleReplyMOTD },
 	{ "375", handleReplyMOTD },
-	{ "432", handleReplyErroneousNickname },
-	{ "433", handleReplyErroneousNickname },
+	{ "401", handleErrorNoSuchNick },
+	{ "432", handleErrorErroneousNickname },
+	{ "433", handleErrorErroneousNickname },
 	{ "JOIN", handleJoin },
 	{ "KICK", handleKick },
 	{ "NICK", handleNick },
mp;follow=1'>Remove hi line numberingJune McEnroe Tags are much better for referring to specific parts of a file and line numbering is better done by a post-processing tool such as cat -n or producing a two-column HTML <table>. 2019-02-18Add Tag class to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe Running hi twice to insert stuff between the head and the content is a bit of a hack but oh well. 2019-02-17Add hi -f html -o anchor for line number linksJune McEnroe 2019-02-17Simplify temp trap in upJune McEnroe 2019-02-17Add line numbers to hiJune McEnroe Renames previous -n option to -m to stay consistent with cat -n. Prefixing lines with line numbers affects where the first tab indent ends up relative to the text above it. Not sure if it's worth fixing somehow. 2019-02-17Always split spans after newlinesJune McEnroe Simplifies ANSI and IRC output code, and prepares for line numbered output. 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe