summary refs log tree commit diff
path: root/chat.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2018-08-03 19:34:28 -0400
committerJune McEnroe <june@causal.agency>2018-08-03 19:34:28 -0400
commit18dcb256acf786a0594b24f0cf35750696f8c8c9 (patch)
treea8e5315a9577c0ba80347b64ec8ff8060b0598ee /chat.c
parentHandle KICK and NICK (diff)
downloadcatgirl-18dcb256acf786a0594b24f0cf35750696f8c8c9.tar.gz
catgirl-18dcb256acf786a0594b24f0cf35750696f8c8c9.zip
Ignore NOTICEs not sent to the channel
Diffstat (limited to 'chat.c')
-rw-r--r--chat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/chat.c b/chat.c
index 0482c03..ecf7267 100644
--- a/chat.c
+++ b/chat.c
@@ -365,9 +365,10 @@ static void handlePrivmsg(char *prefix, char *params) {
 static void handleNotice(char *prefix, char *params) {
 	char *nick = prift(&prefix);
 	char *user = prift(&prefix);
-	shift(&params);
-	char *message = shift(&params);
-	uiFmt("-\3%d%s\3- %s", color(user), nick, message);
+	char *chan = shift(&params);
+	char *mesg = shift(&params);
+	if (strcmp(client.chan, chan)) return;
+	uiFmt("-\3%d%s\3- %s", color(user), nick, mesg);
 }
 
 static const struct {
2021-01-23Call pledge(2) after unveil(2)Klemens Nanni 2021-01-23Separate kiosk mode from restrict modeJune McEnroe 2021-01-21Simplify windowUpdate loops and factor out windowTopJune McEnroe 2021-01-21Document that M-l shows timestampsJune McEnroe 2021-01-19Don't lose swapped window when navigating to current bufferJeremy O'Brien 2021-01-19Use Warm heat for manually inserted blank linesJune McEnroe 2021-01-18Add example tmux(1) configKlemens Nanni 2021-01-17Use Warm heat for blank linesJune McEnroe 2021-01-16Add -I highlight option and /highlightJune McEnroe