Display technical site names in !sites command (fix #40)

This commit is contained in:
Noah 2024-04-15 15:14:37 -05:00
parent c19cb14ade
commit e855c3e630

View File

@ -31,7 +31,11 @@ func registerChatCommands() {
return text + Circles["red"] + "Failed to get sites!"
}
for _, site := range sites {
text = fmt.Sprintf("%s- %s\n", text, site.getName())
text = fmt.Sprintf("%s%s", text, site.getName())
if site.config.name != "" { // Only add technical name to sites with a configured name.
text += " (" + site.name + ")"
}
text += "\n"
}
if len(sites) == 0 {
text = text + "*No sites found*"