- Timestamp:
- 2010-07-12T23:22:53Z (14 years ago)
- Branches:
- master
- Children:
- db2cef1
- Parents:
- 09dfb68
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nick.c
r09dfb68 rbadd148 116 116 while( fmt && *fmt && ret->len < MAX_NICK_LENGTH ) 117 117 { 118 char *part, chop = '\0' ;118 char *part, chop = '\0', *asc = NULL; 119 119 120 120 if( *fmt != '%' ) … … 177 177 } 178 178 179 /* Credits to Josay_ in #bitlbee for this idea. //TRANSLIT 180 should do lossy/approximate conversions, so letters with 181 accents don't just get stripped. Note that it depends on 182 LC_CTYPE being set to something other than C/POSIX. */ 183 if( part ) 184 part = asc = g_convert( part, -1, "ASCII//TRANSLIT//IGNORE", 185 "UTF-8", NULL, NULL, NULL ); 186 179 187 while( part && *part && *part != chop ) 180 188 { … … 185 193 part ++; 186 194 } 195 g_free( asc ); 187 196 } 188 197 … … 195 204 irc_t *irc = (irc_t*) bu->bee->ui_data; 196 205 int inf_protection = 256; 206 irc_user_t *iu; 197 207 198 208 /* Now, find out if the nick is already in use at the moment, and make 199 209 subtle changes to make it unique. */ 200 while( !nick_ok( nick ) || irc_user_by_name( irc, nick ) ) 210 while( !nick_ok( nick ) || 211 ( ( iu = irc_user_by_name( irc, nick ) ) && iu->bu != bu ) ) 201 212 { 202 213 if( strlen( nick ) < ( MAX_NICK_LENGTH - 1 ) )
Note: See TracChangeset
for help on using the changeset viewer.