private void OnConfigurationColorCommand(BotShell bot, CommandArgs e) { if (e.Args.Length < 2) { bot.SendReply(e, "Usage: configuration color [plugin] [key]"); return; } if (!bot.Configuration.IsRegistered(e.Args[0], e.Args[1])) { bot.SendReply(e, "No such configuration entry"); return; } RichTextWindow window = new RichTextWindow(bot); window.AppendTitle(); bool first = true; string section = e.Args[0].ToLower(); string key = e.Args[1].ToLower(); string command = "configuration set " + section + " " + key + " "; foreach (KeyValuePair <string, string> color in this.Colors) { if (color.Value != string.Empty) { window.AppendString(" "); window.AppendBotCommandStart(command + color.Value, true); window.AppendColorString(color.Value, color.Key); window.AppendCommandEnd(); window.AppendLineBreak(); } else { if (!first) { window.AppendLineBreak(); } window.AppendHeader(color.Key); first = false; } } window.AppendLineBreak(); window.AppendHeader("Other"); window.AppendHighlight("To select a different color not listed above use: "); window.AppendLineBreak(); window.AppendNormal("/tell " + bot.Character + " " + command + "<color hex>"); bot.SendReply(e, "Color Selection »» ", window); }