Changes in nick.c [eded1f7:d06eabf]
Legend:
- Unmodified
- Added
- Removed
-
nick.c
reded1f7 rd06eabf 154 154 With one difference, we allow dashes. */ 155 155 156 static char *nick_lc_chars = "0123456789abcdefghijklmnopqrstuvwxyz{}^ `-_|";157 static char *nick_uc_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[]~ `-_\\";158 159 void nick_strip( char * nick )156 static char *nick_lc_chars = "0123456789abcdefghijklmnopqrstuvwxyz{}^-_|"; 157 static char *nick_uc_chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ[]~-_\\"; 158 159 void nick_strip( char * nick ) 160 160 { 161 161 int i, j; … … 170 170 } 171 171 } 172 if( isdigit( nick[0] ) )173 {174 char *orig;175 176 orig = g_strdup( nick );177 g_snprintf( nick, MAX_NICK_LENGTH, "_%s", orig );178 g_free( orig );179 j ++;180 }181 172 while( j <= MAX_NICK_LENGTH ) 182 173 nick[j++] = '\0'; … … 187 178 const char *s; 188 179 189 /* Empty/long nicks are not allowed , nor numbers at [0]*/190 if( !*nick || isdigit( nick[0] ) ||strlen( nick ) > MAX_NICK_LENGTH )180 /* Empty/long nicks are not allowed */ 181 if( !*nick || strlen( nick ) > MAX_NICK_LENGTH ) 191 182 return( 0 ); 192 183
Note: See TracChangeset
for help on using the changeset viewer.