diff --git a/Sources/mechasqueak/RescueBoard/Rescue.swift b/Sources/mechasqueak/RescueBoard/Rescue.swift index 9c5e55c..4680875 100644 --- a/Sources/mechasqueak/RescueBoard/Rescue.swift +++ b/Sources/mechasqueak/RescueBoard/Rescue.swift @@ -168,6 +168,18 @@ class Rescue { self.createdAt = Date() self.updatedAt = Date() self.uploaded = false + + if message.user.associatedAPIData != nil { + if let providedPlatform = GamePlatform.parsedFromText(text: signal.platform ?? ""), let rat = message.user.getRatRepresenting(platform: providedPlatform) { + self.client = rat.name + self.platform = rat.platform + self.expansion = rat.expansion + } else if let rat = message.user.currentRat { + self.client = rat.name + self.platform = rat.platform + self.expansion = rat.expansion + } + } } init? (text: String, clientName: String, fromCommand command: IRCBotCommand) {