From c031269003dca411b3fe13a4d68991b50b674f2c Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 21 May 2021 11:17:41 +0200 Subject: [PATCH] Keep clients strings in lowercase, and sort them --- mod_statsdx/src/mod_statsdx.erl | 68 ++++++++++++++++----------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index 124fd01..af84776 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -891,40 +891,39 @@ list_elem(Type, id) -> Ids; list_elem(clients, full) -> [ - {"Pidgin", pidgin}, - {"pidgin", pidgin}, - {"gaim", gaim}, - {"Gajim", gajim}, - {"Tkabber", tkabber}, - {"Psi", psi}, - {"Adium", adium}, - {"Pandion", pandion}, - {"Instantbird", instantbird}, - {"Telepathy Gabble", 'telepathy-gabble'}, - {"Swift", swift}, - {"Kopete", kopete}, - {"Exodus", exodus}, - {"libgaim", libgaim}, - {"JBother", jbother}, - {"iChat", ichat}, - {"imagent", messages}, - {"Miranda", miranda}, - {"Trillian", trillian}, - {"QIP Infium", qipinfium}, - {"JAJC", jajc}, - {"Coccinella", coccinella}, - {"Gabber", gabber}, - {"BitlBee", bitlbee}, - {"jabber.el", jabberel}, - {"irssi-xmpp", 'irssi-xmpp'}, - {"mcabber", mcabber}, - {"poezio", poezio}, - {"Profanity", profanity}, + {"adium", adium}, + {"aqq", aqq}, + {"bitlbee", bitlbee}, {"centerim", centerim}, - {"Conversations", conversations}, - {"Monal", monal}, - {"AQQ", aqq}, - {"WTW", wtw}, + {"coccinella", coccinella}, + {"conversations", conversations}, + {"exodus", exodus}, + {"gabber", gabber}, + {"gaim", gaim}, + {"gajim", gajim}, + {"ichat", ichat}, + {"imagent", messages}, + {"instantbird", instantbird}, + {"irssi-xmpp", irssi_xmpp}, + {"jabber.el", jabberel}, + {"jajc", jajc}, + {"jbother", jbother}, + {"kopete", kopete}, + {"libgaim", libgaim}, + {"mcabber", mcabber}, + {"miranda", miranda}, + {"monal", monal}, + {"pandion", pandion}, + {"pidgin", pidgin}, + {"poezio", poezio}, + {"profanity", profanity}, + {"psi", psi}, + {"qip infium", qipinfium}, + {"swift", swift}, + {"telepathy gabble", telepathy_gabble}, + {"tkabber", tkabber}, + {"trillian", trillian}, + {"wtw", wtw}, {"yaxim", yaxim}, {"unknown", unknown} ]; @@ -952,7 +951,8 @@ list_elem(oss, full) -> ]. identify(Client, OS) -> - Res = {try_match(Client, list_elem(clients, full)), try_match(OS, list_elem(oss, full))}, + Res = {try_match(string:lowercase(Client), list_elem(clients, full)), + try_match(OS, list_elem(oss, full))}, case Res of {libgaim, mac} -> {adium, mac}; {adium, unknown} -> {adium, mac};