From 2e60ec707966cc0ad1435491d22c12e0ec158305 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 21 May 2021 19:38:21 +0200 Subject: [PATCH] Use also lowercase detection for OS, and add more clients --- mod_statsdx/src/mod_statsdx.erl | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index 9a05d37..d574f06 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -896,8 +896,10 @@ list_elem(clients, full) -> [ {"adium", adium}, {"aqq", aqq}, + {"atalk", atalk}, {"bitlbee", bitlbee}, {"blabber.im", blabber_im}, + {"bruno", bruno}, {"centerim", centerim}, {"coccinella", coccinella}, {"conversations", conversations}, @@ -931,6 +933,7 @@ list_elem(clients, full) -> {"trillian", trillian}, {"vacuum-im", vacuum_im}, {"wtw", wtw}, + {"xabber", xabber}, {"xmpp messenger", xmpp_messenger}, {"xmppjabberclient", xmpp_jabber_client}, {"yaxim", yaxim}, @@ -948,25 +951,24 @@ list_elem(conntypes, full) -> ]; list_elem(oss, full) -> [ - {"Android", android}, - {"BSD", bsd}, - {"Debian", linux}, - {"Gentoo", linux}, - {"KDE", linux}, - {"Linux", linux}, + {"android", android}, + {"bsd", bsd}, + {"debian", linux}, + {"gentoo", linux}, + {"kde", linux}, + {"linux", linux}, {"mac", mac}, - {"Mac", mac}, - {"Mageia", linux}, - {"openSUSE", linux}, - {"SunOS", linux}, - {"Ubuntu", linux}, - {"Win", windows}, + {"mageia", linux}, + {"opensuse", linux}, + {"sunos", linux}, + {"ubuntu", linux}, + {"win", windows}, {"unknown", unknown} ]. identify(Client, OS) -> Res = {try_match(string:lowercase(Client), list_elem(clients, full)), - try_match(OS, list_elem(oss, full))}, + try_match(string:lowercase(OS), list_elem(oss, full))}, case Res of {libgaim, mac} -> {adium, mac}; {adium, unknown} -> {adium, mac};