diff options
author | June McEnroe <june@causal.agency> | 2018-08-17 14:00:08 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-08-17 14:00:08 -0400 |
commit | 38fc42f03d89693fc7e3951fd7257d394f417a6f (patch) | |
tree | de58f141248de2f1f25f1272f865495803490f16 /irc.c | |
parent | Don't treat input as command if word contains extra slash (diff) | |
download | test-38fc42f03d89693fc7e3951fd7257d394f417a6f.tar.gz test-38fc42f03d89693fc7e3951fd7257d394f417a6f.zip |
Add UI "heat" for status/messages/pings
Bring back the beeps! Allow pings from notices. Also factor out dequoting of part/quit messages.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 14 |
1 files changed, 12 insertions, 2 deletions
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]; } |