Color own messages 15

My own settings have "white" slightly darker than the default color, so
this helps to distinguish my own messages.
master
Curtis McEnroe 2018-08-08 00:42:27 -04:00
parent c9b7846d23
commit c0ee457ab1
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 10 additions and 6 deletions

View File

@ -222,16 +222,20 @@ static void handlePrivmsg(char *prefix, char *params) {
shift(&params);
char *mesg = shift(&params);
tabTouch(nick);
bool self = !strcmp(user, chat.user);
bool ping = !strncasecmp(mesg, chat.nick, strlen(chat.nick));
if (ping) uiBeep();
if (mesg[0] == '\1') {
strsep(&mesg, " ");
char *action = strsep(&mesg, "\1");
uiFmt("* \3%d%s\3 %s", color(user), nick, action);
} else {
bool ping = !strncasecmp(mesg, chat.nick, strlen(chat.nick));
if (ping) uiBeep();
uiFmt(
"<%s\3%d%s\17> %s",
(ping ? "\26" : ""), color(user), nick, mesg
"* \3%d%s\3%s %s",
color(user), nick, (self ? "15" : ""), action
);
} else {
uiFmt(
"<%s\3%d%s\17>\3%s %s",
(ping ? "\26" : ""), color(user), nick, (self ? "15" : ""), mesg
);
}
}