Skip to content
Snippets Groups Projects
Commit 25e7ff74 authored by rswindell's avatar rswindell
Browse files

A handy script to report on inactive (dead) networked sub-boards (echoes).

parent c9a2ff1d
No related branches found
No related tags found
No related merge requests found
var t = time();
var sub;
for(sub in msg_area.sub) {
printf("%20s: ", sub);
var msgbase = MsgBase(sub);
if(!msgbase.open()) {
alert(msgbase.last_error);
continue;
}
if(!msgbase.total_msgs) {
alert("No messages");
msgbase.close();
continue;
}
var idx = msgbase.get_msg_index(/* by offset: */true, msgbase.total_msgs-1, /* include_votes: */true);
if(idx == null) {
alert("Can't read index of last message");
continue;
}
var diff = t - idx.time;
var days = diff / (60*60*24);
if(days > 360)
print(format("Inactive (%-5u days): %s", days, msg_area.sub[sub].description));
else
print("active");
msgbase.close();
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment