Set id color from completion in /msg
In the same way that /query copies the id color from completion. Also make both first check that a color isn't already set.weechat-hashes
parent
63bffae8c1
commit
cfd5bf213c
12
command.c
12
command.c
|
@ -135,8 +135,12 @@ static void commandMe(uint id, char *params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void commandMsg(uint id, char *params) {
|
static void commandMsg(uint id, char *params) {
|
||||||
id = idFor(strsep(¶ms, " "));
|
char *nick = strsep(¶ms, " ");
|
||||||
splitMessage("PRIVMSG", id, params);
|
uint msg = idFor(nick);
|
||||||
|
if (idColors[msg] == Default) {
|
||||||
|
idColors[msg] = completeColor(id, nick);
|
||||||
|
}
|
||||||
|
splitMessage("PRIVMSG", msg, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void commandJoin(uint id, char *params) {
|
static void commandJoin(uint id, char *params) {
|
||||||
|
@ -357,7 +361,9 @@ static void commandCS(uint id, char *params) {
|
||||||
static void commandQuery(uint id, char *params) {
|
static void commandQuery(uint id, char *params) {
|
||||||
if (!params) return;
|
if (!params) return;
|
||||||
uint query = idFor(params);
|
uint query = idFor(params);
|
||||||
idColors[query] = completeColor(id, params);
|
if (idColors[query] == Default) {
|
||||||
|
idColors[query] = completeColor(id, params);
|
||||||
|
}
|
||||||
uiShowID(query);
|
uiShowID(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue