feat(controller): enhance command handlers to accept source parameter for improved message formatting

This commit is contained in:
2026-08-19 20:02:18 +08:00
parent 5689c942d2
commit 935ea24d54
4 changed files with 53 additions and 33 deletions
+4 -4
View File
@@ -456,9 +456,9 @@ func (t *Tracker) GetOnlineServers() []string {
for uuid := range t.onlineSet {
name := t.uuidToName[uuid]
if name != "" {
result = append(result, fmt.Sprintf("- %s (%s)", name, uuid))
result = append(result, fmt.Sprintf("- %s (`%s`)", name, uuid))
} else {
result = append(result, fmt.Sprintf("- %s", uuid))
result = append(result, fmt.Sprintf("- `%s`", uuid))
}
}
return result
@@ -478,9 +478,9 @@ func (t *Tracker) GetOfflineServers() []string {
for uuid := range offlineSet {
name := t.uuidToName[uuid]
if name != "" {
result = append(result, fmt.Sprintf("- %s (%s)", name, uuid))
result = append(result, fmt.Sprintf("- %s (`%s`)", name, uuid))
} else {
result = append(result, fmt.Sprintf("- %s", uuid))
result = append(result, fmt.Sprintf("- `%s`", uuid))
}
}
return result