Actions
Bug #5218
closedIn C# API, when using random nick extended colors, User.RgbNickColor property is always empty string
Start date:
01/28/2021
Due date:
% Done:
0%
Estimated time:
Operative System:
All
Regression:
No
Description
(You can workaround this issue by using the evaluated color line below, reporting for completeness.)
When using Nick Colors, 'Use random nick colors' and 'Use extended color list' options, the RgbNickColor property appears to always return empty string.
For example, for the following code:
private void PluginHost_OnChannelNormalMessage(AdiIRCAPIv2.Arguments.ChannelMessages.ChannelNormalMessageArgs argument)
{
string color = argument.Channel.Evaluate($"$rgb($nick({argument.Channel.Name},{argument.User.Nick}).rgbcolor).hex", "");
argument.Channel.ExecuteCommand($"/echo -g {argument.Channel.Name} NickColor: {argument.User.NickColor}");
argument.Channel.ExecuteCommand($"/echo -g {argument.Channel.Name} RgbNickColor: {argument.User.RgbNickColor}");
argument.Channel.ExecuteCommand($"/echo -g {argument.Channel.Name} Evaluated Color: {color}");
}
Will return on a new channel message:
NickColor: 4
RgbNickColor:
Evaluated Color: 762671
- The NickColor is the correct random color if the extended color list option was off.
- The Evaluated Color is correct, evaluated using $nick.
- If a non-randomized extended nick color is set for the nick, RgbNickColor returns that color correctly.
The test project can be found at: https://github.com/TReKiE/AdiTestNickColor/
Actions