when checking client id, look for Transmission first

This commit is contained in:
Mitchell Livingston 2009-05-10 00:14:24 +00:00
parent 7f08a87969
commit 51a3b94ed1
1 changed files with 12 additions and 12 deletions

View File

@ -171,18 +171,7 @@ tr_clientForId( char * buf, size_t buflen, const void * id_in )
/* Azureus-style */
if( id[0] == '-' && id[7] == '-' )
{
if( !memcmp( id+1, "UT", 2 ) )
{
tr_snprintf( buf, buflen, "\xc2\xb5Torrent %d.%d.%d%s",
strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonicEnd(id[6]) );
}
if( !memcmp( id+1, "UM", 2 ) )
{
tr_snprintf( buf, buflen, "\xc2\xb5Torrent Mac %d.%d.%d%s",
strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonicEnd(id[6]) );
}
else if( !memcmp( id+1, "TR", 2 ) )
if( !memcmp( id+1, "TR", 2 ) )
{
if( !memcmp( id+3, "000", 3 ) ) /* very old client style: -TR0006- is 0.6 */
tr_snprintf( buf, buflen, "Transmission 0.%c", id[6] );
@ -193,6 +182,17 @@ tr_clientForId( char * buf, size_t buflen, const void * id_in )
id[6]=='Z' || id[6]=='X' ? "+" : "" );
}
else if( !memcmp( id+1, "UT", 2 ) )
{
tr_snprintf( buf, buflen, "\xc2\xb5Torrent %d.%d.%d%s",
strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonicEnd(id[6]) );
}
else if( !memcmp( id+1, "UM", 2 ) )
{
tr_snprintf( buf, buflen, "\xc2\xb5Torrent Mac %d.%d.%d%s",
strint(id+3,1), strint(id+4,1), strint(id+5,1), getMnemonicEnd(id[6]) );
}
else if( !memcmp( id+1, "AZ", 2 ) )
{
if( id[3] > '3' || ( id[3] == '3' && id[4] >= '1' ) ) /* Vuze starts at version 3.1.0.0 */