Mercurial > noffle
comparison src/noffle.c @ 228:1ad2602f57db noffle
[svn] see Changelog Dec 18 2001
author | mirkol |
---|---|
date | Tue, 18 Dec 2001 15:27:08 +0000 |
parents | ffb1848a39db |
children | f8a91e2b4060 |
comparison
equal
deleted
inserted
replaced
227:c48d7e881a21 | 228:1ad2602f57db |
---|---|
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 342 2001-12-09 12:31:57Z bears $ | 13 $Id: noffle.c 358 2001-12-18 15:27:08Z 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 |
321 Utl_cpyStr( grp, name ); | 321 Utl_cpyStr( grp, name ); |
322 Utl_toLower( grp ); | 322 Utl_toLower( grp ); |
323 name = Utl_stripWhiteSpace( grp ); | 323 name = Utl_stripWhiteSpace( grp ); |
324 | 324 |
325 if ( Grp_exists( name ) ) | 325 if ( Grp_exists( name ) ) |
326 { | |
326 fprintf( stderr, "'%s' already exists.\n", name ); | 327 fprintf( stderr, "'%s' already exists.\n", name ); |
328 return; | |
329 } | |
330 if ( ! Grp_isValidGroupName( name ) ) | |
331 fprintf( stderr, "'%s' invalid group name.\n", name ); | |
327 else | 332 else |
328 { | 333 { |
329 Log_inf( "Creating new local group '%s'", name ); | 334 Log_inf( "Creating new local group '%s'", name ); |
330 Grp_create( name ); | 335 Grp_create( name ); |
331 Grp_setLocal( name ); | 336 Grp_setLocal( name ); |
344 Utl_cpyStr( grp, name ); | 349 Utl_cpyStr( grp, name ); |
345 Utl_toLower( grp ); | 350 Utl_toLower( grp ); |
346 name = Utl_stripWhiteSpace( grp ); | 351 name = Utl_stripWhiteSpace( grp ); |
347 | 352 |
348 if ( ! Grp_exists( name ) ) | 353 if ( ! Grp_exists( name ) ) |
354 { | |
349 fprintf( stderr, "'%s' does not exist.\n", name ); | 355 fprintf( stderr, "'%s' does not exist.\n", name ); |
356 return; | |
357 } | |
358 if ( ! Grp_isValidGroupName( name ) ) | |
359 { | |
360 fprintf( stderr, "'%s' invalid group name. Skipping deletion of overviews.\n", name ); | |
361 Log_inf( "Deleting invalid group '%s' without deleting overviews.", name ); | |
362 Grp_delete( name ); | |
363 printf( "Group '%s' deleted.\n", name ); | |
364 } | |
350 else | 365 else |
351 { | 366 { |
352 int i; | 367 int i; |
353 | 368 |
354 Log_inf( "Deleting group '%s'", name ); | 369 Log_inf( "Deleting group '%s'", name ); |