summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/handle.c b/handle.c
index 865bbad..5058e34 100644
--- a/handle.c
+++ b/handle.c
@@ -370,7 +370,8 @@ static void handleCTCP(struct Tag tag, char *nick, char *user, char *mesg) {
 static void handlePrivmsg(char *prefix, char *params) {
 	char *nick, *user, *chan, *mesg;
 	shift(prefix, &nick, &user, NULL, params, 2, 0, &chan, &mesg);
-	struct Tag tag = (strcmp(chan, self.nick) ? tagFor(chan) : tagFor(nick));
+	bool direct = !strcmp(chan, self.nick);
+	struct Tag tag = (direct ? tagFor(nick) : tagFor(chan));
 	if (mesg[0] == '\1') {
 		handleCTCP(tag, nick, user, mesg);
 		return;
@@ -380,7 +381,7 @@ static void handlePrivmsg(char *prefix, char *params) {
 	if (!self) tabTouch(tag, nick);
 
 	urlScan(tag, mesg);
-	bool ping = !self && isPing(mesg);
+	bool ping = !self && (direct || isPing(mesg));
 	uiFmt(
 		tag, (ping ? UI_HOT : UI_WARM),
 		"%c\3%d%c%s%c\17 %s",
d=07461047d65974f28538e164b57c7f2fa8d87b56&follow=1'>Call updateConsumer from handleError 1.2p1June McEnroe 2020-04-20Use . as ${LDLIBS.$@} separatorJune McEnroe 2020-04-05Error on invalid ISUPPORT values 1.2June McEnroe 2020-04-05Only set RCS on FreeBSDJune McEnroe 2020-04-05Log bans and unbansJune McEnroe 2020-04-05Parse mode types from ISUPPORTJune McEnroe 2020-04-05Add unscoop matchers for ban/unban eventsJune McEnroe 2020-04-05Check unscoop regexps with make testJune McEnroe 2020-04-05Add unscoop -n flag for checking regexpsJune McEnroe 2020-04-05Add Ban and Unban event typesJune McEnroe 2020-04-02Update styleJune McEnroe 2020-03-31Update unscoop catgirl matchersJune McEnroe 2020-03-31Fix writing verbose to stderrJune McEnroe 2020-03-02Include <>/-/* around nicks in scoop coloring 1.1June McEnroe 2020-03-02Replace .mk files with configure scriptJune McEnroe 2020-02-28Implement the causal.agency/consumer capabilityJune McEnroe 2020-02-22Include <>/-/* around nicks in coloringJune McEnroe 2020-02-22Use (almost) the full range of IRC colors for nicksJune McEnroe