Mercurial > noffle
diff src/group.h @ 191:28488e0e3630 noffle
[svn] * src/group.h,src/group.c,src/noffle.c,src/server.c: Grp_setLastAccess is
only ever called with last param as time(NULL), so remove it and call
time() inside the implementation of Grp_setLastAccess.
* src/client.c,src/group.h,src/group.c,src/noffle.c,src/post.c: Groups are
automatically unsubscribed when the last access to the group is older
than a particular threshold. However, for very low traffic groups, the
last access may exceed the threshold simply because there has been no new
article posted. In this case, rather than unsubscribe, update the group
last access time. This means that groups are now only unsubscribed if
the last access exceeds the threshold AND articles have arrived in the
group since. Add Grp_setLastPostTime() to track the last time an article
arrived in the group.
author | bears |
---|---|
date | Sat, 20 Oct 2001 14:23:46 +0100 |
parents | 3c71e28c8eef |
children | 1ad2602f57db |
line wrap: on
line diff
--- a/src/group.h Fri Oct 05 16:44:22 2001 +0100 +++ b/src/group.h Sat Oct 20 14:23:46 2001 +0100 @@ -3,7 +3,7 @@ Groups database - $Id: group.h 183 2000-07-25 12:14:54Z bears $ + $Id: group.h 310 2001-10-20 13:23:46Z bears $ */ #ifndef GRP_H @@ -89,6 +89,9 @@ char Grp_postAllow( const char *name ); +time_t +Grp_lastPostTime( const char *name ); + /* Replace group's description (only if value != ""). */ void Grp_setDsc( const char *name, const char *value ); @@ -103,7 +106,7 @@ Grp_setRmtNext( const char *name, int value ); void -Grp_setLastAccess( const char *name, int value ); +Grp_setLastAccess( const char *name ); void Grp_setFirstLast( const char *name, int first, int last ); @@ -111,6 +114,9 @@ void Grp_setPostAllow( const char *name, char postAllow ); +void +Grp_setLastPostTime( const char *name ); + /* Begin iterating trough the names of all groups. Store name of first group (or NULL if there aren't any) in name. Returns whether there are any groups. */