Color own messages 15
My own settings have "white" slightly darker than the default color, so this helps to distinguish my own messages.weechat-hashes
parent
c9b7846d23
commit
c0ee457ab1
16
handle.c
16
handle.c
|
@ -222,16 +222,20 @@ static void handlePrivmsg(char *prefix, char *params) {
|
||||||
shift(¶ms);
|
shift(¶ms);
|
||||||
char *mesg = shift(¶ms);
|
char *mesg = shift(¶ms);
|
||||||
tabTouch(nick);
|
tabTouch(nick);
|
||||||
|
bool self = !strcmp(user, chat.user);
|
||||||
|
bool ping = !strncasecmp(mesg, chat.nick, strlen(chat.nick));
|
||||||
|
if (ping) uiBeep();
|
||||||
if (mesg[0] == '\1') {
|
if (mesg[0] == '\1') {
|
||||||
strsep(&mesg, " ");
|
strsep(&mesg, " ");
|
||||||
char *action = strsep(&mesg, "\1");
|
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(
|
uiFmt(
|
||||||
"<%s\3%d%s\17> %s",
|
"* \3%d%s\3%s %s",
|
||||||
(ping ? "\26" : ""), color(user), nick, mesg
|
color(user), nick, (self ? "15" : ""), action
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
uiFmt(
|
||||||
|
"<%s\3%d%s\17>\3%s %s",
|
||||||
|
(ping ? "\26" : ""), color(user), nick, (self ? "15" : ""), mesg
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue