diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 11:04:51 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-07-17 11:04:51 +0100 |
commit | 177ffd7da1570485698f6c105374e86c4471c94a (patch) | |
tree | 428784324a5cdf922a5dcd97ea2ea209ab0c0997 /nick.c | |
parent | e43736627ab8fa174352ba6a0122a6dade08a8d7 (diff) |
nick_gen() should also insert an underscore if the first character of a nick
would otherwise be a digit.
Diffstat (limited to 'nick.c')
-rw-r--r-- | nick.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -184,6 +184,9 @@ char *nick_gen( bee_user_t *bu ) part = asc = g_convert( part, -1, "ASCII//TRANSLIT//IGNORE", "UTF-8", NULL, NULL, NULL ); + if( ret->len == 0 && *part && isdigit( *part ) ) + g_string_append_c( ret, '_' ); + while( part && *part && *part != chop ) { if( strchr( nick_lc_chars, *part ) || |