- Timestamp:
- 2010-07-28T08:24:47Z (14 years ago)
- Branches:
- master
- Children:
- 3963fdd
- Parents:
- 13fa2db
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/account.c
r13fa2db r3b3c50d9 73 73 set_setstr( &a->set, "username", user ); 74 74 75 if( account_by_tag( bee, prpl->name ) ) 76 { 75 /* Hardcode some more clever tag guesses. */ 76 strcpy( tag, prpl->name ); 77 if( strcmp( prpl->name, "oscar" ) == 0 ) 78 { 79 if( isdigit( a->user[0] ) ) 80 strcpy( tag, "icq" ); 81 else 82 strcpy( tag, "aim" ); 83 } 84 else if( strcmp( prpl->name, "jabber" ) == 0 ) 85 { 86 if( strstr( a->user, "@gmail.com" ) || 87 strstr( a->user, "@googlemail.com" ) ) 88 strcpy( tag, "gtalk" ); 89 else if( strstr( a->user, "@chat.facebook.com" ) ) 90 strcpy( tag, "fb" ); 91 } 92 93 if( account_by_tag( bee, tag ) ) 94 { 95 char *numpos = tag + strlen( tag ); 77 96 int i; 78 97 79 98 for( i = 2; i < 10000; i ++ ) 80 99 { 81 sprintf( tag, "%s%d", prpl->name, i );100 sprintf( numpos, "%d", i ); 82 101 if( !account_by_tag( bee, tag ) ) 83 102 break; 84 103 } 85 }86 else87 {88 strcpy( tag, prpl->name );89 104 } 90 105 set_setstr( &a->set, "tag", tag );
Note: See TracChangeset
for help on using the changeset viewer.