- Timestamp:
- 2007-04-20T04:49:30Z (18 years ago)
- Branches:
- master
- Children:
- 61ae52c
- Parents:
- f0cb961
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nick.c
rf0cb961 rd323394c 2 2 * BitlBee -- An IRC to other IM-networks gateway * 3 3 * * 4 * Copyright 2002-200 6Wilmer van der Gaast and others *4 * Copyright 2002-2007 Wilmer van der Gaast and others * 5 5 \********************************************************************/ 6 6 … … 53 53 } 54 54 55 char *nick_get( account_t *acc, const char *handle , const char *realname)55 char *nick_get( account_t *acc, const char *handle ) 56 56 { 57 57 static char nick[MAX_NICK_LENGTH+1]; … … 76 76 while( *s ) 77 77 *(s++) = 0; 78 79 /* All-digit handles (mainly ICQ UINs) aren't cool, try to80 use the realname instead. */81 for( s = nick; *s && isdigit( *s ); s ++ );82 if( !*s && realname && *realname )83 g_snprintf( nick, MAX_NICK_LENGTH, "%s", realname );84 78 85 79 nick_strip( nick ); … … 130 124 } 131 125 126 /* Just check if there is a nickname set for this buddy or if we'd have to 127 generate one. */ 128 int nick_saved( account_t *acc, const char *handle ) 129 { 130 char *store_handle, *found; 131 132 store_handle = clean_handle( handle ); 133 found = g_hash_table_lookup( acc->nicks, store_handle ); 134 g_free( store_handle ); 135 136 return found != NULL; 137 } 138 132 139 void nick_del( account_t *acc, const char *handle ) 133 140 { … … 176 183 int nick_lc( char *nick ) 177 184 { 178 static char tab[ 256] = { 0 };185 static char tab[128] = { 0 }; 179 186 int i; 180 187
Note: See TracChangeset
for help on using the changeset viewer.