Use also lowercase detection for OS, and add more clients
This commit is contained in:
parent
1096159be1
commit
2e60ec7079
|
@ -896,8 +896,10 @@ list_elem(clients, full) ->
|
||||||
[
|
[
|
||||||
{"adium", adium},
|
{"adium", adium},
|
||||||
{"aqq", aqq},
|
{"aqq", aqq},
|
||||||
|
{"atalk", atalk},
|
||||||
{"bitlbee", bitlbee},
|
{"bitlbee", bitlbee},
|
||||||
{"blabber.im", blabber_im},
|
{"blabber.im", blabber_im},
|
||||||
|
{"bruno", bruno},
|
||||||
{"centerim", centerim},
|
{"centerim", centerim},
|
||||||
{"coccinella", coccinella},
|
{"coccinella", coccinella},
|
||||||
{"conversations", conversations},
|
{"conversations", conversations},
|
||||||
|
@ -931,6 +933,7 @@ list_elem(clients, full) ->
|
||||||
{"trillian", trillian},
|
{"trillian", trillian},
|
||||||
{"vacuum-im", vacuum_im},
|
{"vacuum-im", vacuum_im},
|
||||||
{"wtw", wtw},
|
{"wtw", wtw},
|
||||||
|
{"xabber", xabber},
|
||||||
{"xmpp messenger", xmpp_messenger},
|
{"xmpp messenger", xmpp_messenger},
|
||||||
{"xmppjabberclient", xmpp_jabber_client},
|
{"xmppjabberclient", xmpp_jabber_client},
|
||||||
{"yaxim", yaxim},
|
{"yaxim", yaxim},
|
||||||
|
@ -948,25 +951,24 @@ list_elem(conntypes, full) ->
|
||||||
];
|
];
|
||||||
list_elem(oss, full) ->
|
list_elem(oss, full) ->
|
||||||
[
|
[
|
||||||
{"Android", android},
|
{"android", android},
|
||||||
{"BSD", bsd},
|
{"bsd", bsd},
|
||||||
{"Debian", linux},
|
{"debian", linux},
|
||||||
{"Gentoo", linux},
|
{"gentoo", linux},
|
||||||
{"KDE", linux},
|
{"kde", linux},
|
||||||
{"Linux", linux},
|
{"linux", linux},
|
||||||
{"mac", mac},
|
{"mac", mac},
|
||||||
{"Mac", mac},
|
{"mageia", linux},
|
||||||
{"Mageia", linux},
|
{"opensuse", linux},
|
||||||
{"openSUSE", linux},
|
{"sunos", linux},
|
||||||
{"SunOS", linux},
|
{"ubuntu", linux},
|
||||||
{"Ubuntu", linux},
|
{"win", windows},
|
||||||
{"Win", windows},
|
|
||||||
{"unknown", unknown}
|
{"unknown", unknown}
|
||||||
].
|
].
|
||||||
|
|
||||||
identify(Client, OS) ->
|
identify(Client, OS) ->
|
||||||
Res = {try_match(string:lowercase(Client), list_elem(clients, full)),
|
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
|
case Res of
|
||||||
{libgaim, mac} -> {adium, mac};
|
{libgaim, mac} -> {adium, mac};
|
||||||
{adium, unknown} -> {adium, mac};
|
{adium, unknown} -> {adium, mac};
|
||||||
|
|
Loading…
Reference in New Issue