Mercurial > noffle
comparison src/noffle.c @ 250:93d5d8b098da noffle
[svn] *** empty log message ***
author | mirkol |
---|---|
date | Wed, 05 Jun 2002 23:03:44 +0100 |
parents | 0340b9c17edc |
children | 52f467c7213b |
comparison
equal
deleted
inserted
replaced
249:0340b9c17edc | 250:93d5d8b098da |
---|---|
8 not as server. If noffle runs as server, locking is performed while | 8 not as server. If noffle runs as server, locking is performed while |
9 executing NNTP commands, but temporarily released if no new command is | 9 executing NNTP commands, but temporarily released if no new command is |
10 received for some seconds (to allow multiple clients connect at the same | 10 received for some seconds (to allow multiple clients connect at the same |
11 time). | 11 time). |
12 | 12 |
13 $Id: noffle.c 381 2002-05-14 14:25:45Z mirkol $ | 13 $Id: noffle.c 382 2002-06-05 22:03:44Z mirkol $ |
14 */ | 14 */ |
15 | 15 |
16 #if HAVE_CONFIG_H | 16 #if HAVE_CONFIG_H |
17 #include <config.h> | 17 #include <config.h> |
18 #endif | 18 #endif |
328 if ( Grp_exists( name ) ) | 328 if ( Grp_exists( name ) ) |
329 { | 329 { |
330 fprintf( stderr, "'%s' already exists.\n", name ); | 330 fprintf( stderr, "'%s' already exists.\n", name ); |
331 return; | 331 return; |
332 } | 332 } |
333 if ( ! Grp_isValidGroupName( name ) ) | 333 if ( ! Grp_isValidName( name ) ) |
334 fprintf( stderr, "'%s' invalid group name.\n", name ); | 334 fprintf( stderr, "'%s' invalid group name.\n", name ); |
335 else if ( Grp_isForbiddenName( name ) ) | |
336 fprintf( stderr, "'%s' forbidden group name.\n", name ); | |
335 else | 337 else |
336 { | 338 { |
337 Log_inf( "Creating new local group '%s'", name ); | 339 Log_inf( "Creating new local group '%s'", name ); |
338 Grp_create( name ); | 340 Grp_create( name ); |
339 Grp_setLocal( name ); | 341 Grp_setLocal( name ); |
356 if ( ! Grp_exists( name ) ) | 358 if ( ! Grp_exists( name ) ) |
357 { | 359 { |
358 fprintf( stderr, "'%s' does not exist.\n", name ); | 360 fprintf( stderr, "'%s' does not exist.\n", name ); |
359 return; | 361 return; |
360 } | 362 } |
361 if ( ! Grp_isValidGroupName( name ) ) | 363 if ( ! Grp_isValidName( name ) ) |
362 { | 364 { |
363 fprintf( stderr, "'%s' invalid group name. Skipping deletion of overviews.\n", name ); | 365 fprintf( stderr, "'%s' invalid group name. Skipping deletion of overviews.\n", name ); |
364 Log_inf( "Deleting invalid group '%s' without deleting overviews.", name ); | 366 Log_inf( "Deleting invalid group '%s' without deleting overviews.", name ); |
365 Grp_delete( name ); | 367 Grp_delete( name ); |
366 printf( "Group '%s' deleted.\n", name ); | 368 printf( "Group '%s' deleted.\n", name ); |