Changeset 4c17d19
- Timestamp:
- 2010-05-10T09:05:26Z (15 years ago)
- Branches:
- master
- Children:
- 3663bb3
- Parents:
- a067771
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
ra067771 r4c17d19 202 202 gboolean irc_channel_name_ok( const char *name ) 203 203 { 204 return strchr( CTYPES, name[0] ) != NULL && nick_ok( name + 1 ); 204 char name_[strlen(name)+1]; 205 206 /* Check if the first character is in CTYPES (#&) */ 207 if( strchr( CTYPES, name[0] ) == NULL ) 208 return FALSE; 209 210 /* Check the rest of the name. Just checking name + 1 doesn't work 211 since it will fail if the first character is a number, or if 212 it's a one-char channel name - both of which are legal. */ 213 name_[0] = '_'; 214 strcpy( name_ + 1, name + 1 ); 215 return nick_ok( name_ ); 205 216 } 206 217
Note: See TracChangeset
for help on using the changeset viewer.