From 541cbaabd2e3c17b127443b220fd856b1c5a4813 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 24 Mar 2018 15:36:41 +1300 Subject: [PATCH] client tags: assume atomic/yaaic are the latest abandonware versions --HG-- branch : nmdc-ircfrontend --- clientTag.go | 8 ++++++++ clientTag_test.go | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/clientTag.go b/clientTag.go index 89a2746..2860401 100644 --- a/clientTag.go +++ b/clientTag.go @@ -27,6 +27,14 @@ func parseVersion(ver string) clientTag { ret.AppName = cParts[0] ret.Version = cParts[1] + } else if ver == "Atomic - An IRC client for Android https://indrora.github.io/Atomic" { + ret.AppName = "Atomic" + ret.Version = "2.1" // Abandonware. Last available version + + } else if ver == "Yaaic - Yet Another Android IRC Client - http://www.yaaic.org" { + ret.AppName = "Yaaic" + ret.Version = "1.1" // Abandonware. Last available version + } else { // Special cases all failed, time for heuristics diff --git a/clientTag_test.go b/clientTag_test.go index d716247..b05b048 100644 --- a/clientTag_test.go +++ b/clientTag_test.go @@ -52,6 +52,16 @@ func TestParseVersion(t *testing.T) { "irssi v1.0.2-1+deb9u3", "irssi", "1.0.2", }, + + [3]string{ + "Atomic - An IRC client for Android https://indrora.github.io/Atomic", + "Atomic", "2.1", + }, + + [3]string{ + "Yaaic - Yet Another Android IRC Client - http://www.yaaic.org", + "Yaaic", "1.1", + }, } for _, test := range tests {