Mercurial > noffle
comparison src/noffle.c @ 102:38b0a1532a37 noffle
[svn] Only track remote message no when subscribed
author | bears |
---|---|
date | Mon, 05 Jun 2000 09:57:05 +0100 |
parents | 0428aed4f9d0 |
children | af7bea7515b2 |
comparison
equal
deleted
inserted
replaced
101:ce8191c38f44 | 102:38b0a1532a37 |
---|---|
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 119 2000-05-20 14:11:21Z enz $ | 13 $Id: noffle.c 135 2000-06-05 08:57:05Z bears $ |
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 |
44 #include "server.h" | 44 #include "server.h" |
45 #include "request.h" | 45 #include "request.h" |
46 #include "lock.h" | 46 #include "lock.h" |
47 #include "portable.h" | 47 #include "portable.h" |
48 | 48 |
49 static void | |
50 doUnsubscribe( const char *name ); | |
49 | 51 |
50 struct Noffle | 52 struct Noffle |
51 { | 53 { |
52 Bool queryGrps; | 54 Bool queryGrps; |
53 Bool queryDsc; | 55 Bool queryDsc; |
264 { | 266 { |
265 Log_ntc( "Auto-unsubscribing from %s after %d " | 267 Log_ntc( "Auto-unsubscribing from %s after %d " |
266 "days without access", | 268 "days without access", |
267 grp, autoUnsubscribeDays ); | 269 grp, autoUnsubscribeDays ); |
268 Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays ); | 270 Pseudo_autoUnsubscribed( grp, autoUnsubscribeDays ); |
269 Fetchlist_read(); | 271 doUnsubscribe( grp ); |
270 Fetchlist_remove( grp ); | |
271 Fetchlist_write(); | |
272 } | 272 } |
273 Cont_write(); | 273 Cont_write(); |
274 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); | 274 Grp_setFirstLast( grp, Cont_first(), Cont_last() ); |
275 Log_inf( "%ld overviews deleted from group %s, %ld left (%ld-%ld)", | 275 Log_inf( "%ld overviews deleted from group %s, %ld left (%ld-%ld)", |
276 cntDel, grp, cntLeft, Grp_first( grp ), Grp_last( grp ) ); | 276 cntDel, grp, cntLeft, Grp_first( grp ), Grp_last( grp ) ); |
500 Fetchlist_read(); | 500 Fetchlist_read(); |
501 if ( ! Fetchlist_remove( name ) ) | 501 if ( ! Fetchlist_remove( name ) ) |
502 printf( "%s is not in fetch list.\n", name ); | 502 printf( "%s is not in fetch list.\n", name ); |
503 else | 503 else |
504 printf( "%s removed from fetch list.\n", name ); | 504 printf( "%s removed from fetch list.\n", name ); |
505 if ( ! Fetchlist_write() ) | 505 if ( Fetchlist_write() ) |
506 Grp_setRmtNext( name, GRP_RMT_NEXT_NOT_SUBSCRIBED ); | |
507 else | |
506 fprintf( stderr, "Could not save fetchlist.\n" ); | 508 fprintf( stderr, "Could not save fetchlist.\n" ); |
507 } | 509 } |
508 | 510 |
509 static void | 511 static void |
510 printUsage( void ) | 512 printUsage( void ) |