From a58b45b9503ee40101e5621748ea1af0b6150a3f Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 18 Oct 2017 19:33:41 +1000 Subject: [PATCH] Attempt to reset numbers each day on bwave pkts --- src/bluewave.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bluewave.c b/src/bluewave.c index 9207f82..54365d7 100644 --- a/src/bluewave.c +++ b/src/bluewave.c @@ -378,6 +378,11 @@ void bwave_create_packet() { if (gUser->bwavestyle) { thetime = time(NULL); localtime_r(&thetime, &time_tm); + + if (gUser->bwavepktno / 10 != time_tm.tm_wday) { + gUser->bwavepktno = time_tm.tm_wday * 10; + } + snprintf(archive, 1024, "%s/node%d/%s.%s%d", conf.bbs_path, mynode, conf.bwave_name, weekday[time_tm.tm_wday], gUser->bwavepktno % 10); } else { snprintf(archive, 1024, "%s/node%d/%s.%03d", conf.bbs_path, mynode, conf.bwave_name, gUser->bwavepktno);