From 38fc42f03d89693fc7e3951fd7257d394f417a6f Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Fri, 17 Aug 2018 14:00:08 -0400 Subject: Add UI "heat" for status/messages/pings Bring back the beeps! Allow pings from notices. Also factor out dequoting of part/quit messages. --- irc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'irc.c') diff --git a/irc.c b/irc.c index 0a131b2..fa858b4 100644 --- a/irc.c +++ b/irc.c @@ -106,7 +106,12 @@ void ircFmt(const char *format, ...) { int len = vasprintf(&buf, format, ap); va_end(ap); if (!buf) err(EX_OSERR, "vasprintf"); - if (self.verbose) uiFmt(TAG_VERBOSE, "\3%d<<<\3 %.*s", IRC_WHITE, len - 2, buf); + if (self.verbose) { + uiFmt( + TAG_VERBOSE, UI_COLD, + "\3%d<<<\3 %.*s", IRC_WHITE, len - 2, buf + ); + } ircWrite(buf, len); free(buf); } @@ -126,7 +131,12 @@ void ircRead(void) { char *crlf, *line = buf; while ((crlf = strnstr(line, "\r\n", &buf[len] - line))) { crlf[0] = '\0'; - if (self.verbose) uiFmt(TAG_VERBOSE, "\3%d>>>\3 %s", IRC_GRAY, line); + if (self.verbose) { + uiFmt( + TAG_VERBOSE, UI_COLD, + "\3%d>>>\3 %s", IRC_GRAY, line + ); + } handle(line); line = &crlf[2]; } -- cgit 1.4.1-2-gfad0