Color notices LightGray by default

weechat-hashes
C. McEnroe 2020-02-06 22:59:49 -05:00
parent 9cff026b5a
commit 87e42cc627
1 changed files with 20 additions and 12 deletions

View File

@ -294,18 +294,26 @@ static void handlePrivmsg(struct Message *msg) {
bool notice = (msg->cmd[0] == 'N'); bool notice = (msg->cmd[0] == 'N');
bool action = isAction(msg); bool action = isAction(msg);
bool mention = !mine && isMention(msg); bool mention = !mine && isMention(msg);
const char *italic = (action ? "\35" : ""); if (notice) {
const char *reverse = (mention ? "\26" : ""); uiFormat(
uiFormat( id, Warm, tagTime(msg),
id, (!notice && (mention || query) ? Hot : Warm), tagTime(msg), "%s\3%d-%s-\17\3%d\t%s",
"%s%s\3%d%s%s%s\3%s\t%s", (mention ? "\26" : ""), hash(msg->user), msg->nick,
italic, reverse, hash(msg->user), LightGray, msg->params[1]
(action ? "* " : notice ? "-" : "<"), );
msg->nick, } else if (action) {
(action ? "" : notice ? "-" : ">"), uiFormat(
reverse, id, (mention || query ? Hot : Warm), tagTime(msg),
msg->params[1] "%s\35\3%d* %s\17\35\t%s",
); (mention ? "\26" : ""), hash(msg->user), msg->nick, msg->params[1]
);
} else {
uiFormat(
id, (mention || query ? Hot : Warm), tagTime(msg),
"%s\3%d<%s>\17\t%s",
(mention ? "\26" : ""), hash(msg->user), msg->nick, msg->params[1]
);
}
} }
static void handlePing(struct Message *msg) { static void handlePing(struct Message *msg) {