summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/chat.c b/chat.c
index d616b91..0482c03 100644
--- a/chat.c
+++ b/chat.c
@@ -271,6 +271,17 @@ static void handleQuit(char *prefix, char *params) {
 		color(user), nick, quot, mesg, quot
 	);
 }
+static void handleKick(char *prefix, char *params) {
+	char *nick = prift(&prefix);
+	char *user = prift(&prefix);
+	char *chan = shift(&params);
+	char *kick = shift(&params);
+	char *mesg = shift(&params);
+	uiFmt(
+		"\3%d%s\3 kicked \3%d%s\3 out of \3%d%s\3, \"%s\"",
+		color(user), nick, color(kick), kick, color(chan), chan, mesg
+	);
+}
 
 static void handle332(char *prefix, char *params) {
 	(void)prefix;
@@ -329,6 +340,16 @@ static void handle315(char *prefix, char *params) {
 	);
 }
 
+static void handleNick(char *prefix, char *params) {
+	char *prev = prift(&prefix);
+	char *user = prift(&prefix);
+	char *next = shift(&params);
+	uiFmt(
+		"\3%d%s\3 is now known as \3%d%s\3",
+		color(user), prev, color(user), next
+	);
+}
+
 static void handlePrivmsg(char *prefix, char *params) {
 	char *nick = prift(&prefix);
 	char *user = prift(&prefix);
@@ -359,6 +380,8 @@ static const struct {
 	{ "352", handle352 },
 	{ "366", handle366 },
 	{ "JOIN", handleJoin },
+	{ "KICK", handleKick },
+	{ "NICK", handleNick },
 	{ "NOTICE", handleNotice },
 	{ "PART", handlePart },
 	{ "PING", handlePing },
ntly's Holistic Detective AgencyJune McEnroe 2019-02-20Move /opt/pkg after /usr in PATHJune McEnroe 2019-02-20Set man_hard_wrap in nvimJune McEnroe 2019-02-18Use hi -o anchor in upJune McEnroe 2019-02-18Don't match nested parentheses in Tag for CJune McEnroe 2019-02-18Match whitespace between * [] {}June McEnroe 2019-02-18Fix function-like #define regexJune McEnroe 2019-02-18Match Tag in RustJune McEnroe 2019-02-18Match sh functions as TagJune McEnroe 2019-02-18Match Sh and Ss as Tag in mdocJune McEnroe 2019-02-18Match statics and typedefs as TagJune McEnroe 2019-02-18Clean up htmlHeaderJune McEnroe 2019-02-18Remove hi line numberingJune McEnroe 2019-02-18Add Tag class to hiJune McEnroe 2019-02-17Generate HTML with hi -n -f html -o anchorJune McEnroe 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 2019-02-17Always split spans after newlinesJune McEnroe 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