-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ ) || 0;
-$main::build += $VERSION;
-$main::branch += $BRANCH;
+our $maxcache = 130;
+our @anncache;
+
+sub init
+{
+ @anncache = DXLog::search(0, $maxcache, $main::systime, 'ann');
+ shift @anncache while @anncache > $maxcache;
+ my $l = @anncache;
+ dbg("AnnTalk: loaded last $l announcements into cache");
+}
+
+sub add_anncache
+{
+ push @anncache, [ $main::systime, @_ ];
+ shift @anncache while @anncache > $maxcache;
+}