Please give it a go, let me know if it's useful. Always happy to add enhancements.
Nelgin wrote to All <=-
I saw on my BBS that some new users have been making posts, but
it wasn't very easy to determine where they were posting and what
they were dumping on the network.
I've whipped up a quick script, with the help of Digial Man, that
will go through all your message bases and display the messages
posted from your BBS in the last 24 hours.
Download https://www.endofthelinebbs.com/localposts.js.txt and
save it as localhosts.js in your /sbbs/mods directory.
Simply run jsexec localposts
It will display from, to, subject, date, which echo it was posted
in and the message body in plain text with @-codes stripped.
Please give it a go, let me know if it's useful. Always happy to
add enhancements.
Download https://www.endofthelinebbs.com/localposts.js.txt and save it as localhosts.js in your /sbbs/mods directory.
I saw on my BBS that some new users have been making posts, but it wasn't very easy to determine where they were posting and what they were dumping on the network.
Please give it a go, let me know if it's useful. Always happy to add enhancements.
Nelgin wrote to All <=-
I saw on my BBS that some new users have been making posts, but
it wasn't very easy to determine where they were posting and what
they were dumping on the network.
I've whipped up a quick script, with the help of Digial Man, that
will go through all your message bases and display the messages
posted from your BBS in the last 24 hours.
Download https://www.endofthelinebbs.com/localposts.js.txt and
save it as localhosts.js in your /sbbs/mods directory.
Simply run jsexec localposts
It will display from, to, subject, date, which echo it was posted
in and the message body in plain text with @-codes stripped.
Please give it a go, let me know if it's useful. Always happy to
add enhancements.
Sweet! Seems to work fine here, thanks for doing it!
One thing I'd like to see - on the "Echo:" line, could that include
the FTN network name (such as Fido, or FSXnet)? Reason I ask is that something like a BBS ad which may get posted to several networks just
shows up as "BBS Ads" or "BBS Promotion" and it's hard to
remember/know which network that echo may be in.
Please give it a go, let me know if it's useful. Always happy to add enhancements.
This sounds useful - I think it should be included in the git repo...
I'm curious why you named it .js.txt? It's fairly easy to save (or directly download) a file with a .js filename extension.
It's interesting, but I'm wondering what purpose this is meant to serve? Were you concerned about users posting spam?
I thought I mentioned that but yes. I've had users sign up and post spam in the local groups, which I allow before I verify them (in case of email issues or whatever). I don't allow posting to networked groups now until I increase their privs, but there's still the possiblity of someone going rogue. This will let me check, quickly, what has been posted the previous 24 hours.
And if you can't (or forget) to check one day, is your script flexible enough to go back 2 or more days?
Re: Posts in the last 24 hours
By: Digital Man to Nigel Reed on Sat Nov 05 2022 14:48:47
And if you can't (or forget) to check one day, is your script flexible enough to go back 2 or more days?
// This is the number of seconds we're going to look back for messages. Time is in miliseconds
// the default is 24 hours.
const duration=24*60*60*1000
Just change 24 to 48 or or how many hours you wish to go back.
Just change 24 to 48 or or how many hours you wish to go back.
Or accept the number of days as a command-line option?
Or accept the number of days as a command-line option?
I think you got me mistaken for someone who knows how to do stuff :)
There's a global property called argv which contains command-line arguments
Nelgin wrote to Nightfox <=-
Re: Posts in the last 24 hours
By: Nightfox to Nelgin on Mon Nov 07 2022 09:55:41
There's a global property called argv which contains command-line arguments
Pretty much every language has an arvg ;)
and yes, I did this before I read your post.
You can now pass a numerical argument and it'll use that for the
number of hours.
jsexec localposts.js 6
Will look back just 6 hours
jsexec localposts.js 168
Will go back a whole week.
I've only done basic testing, but it should fail on anything
that's not a number and default to 24 hours.
Latest version is now at:
https://www.endofthelinebbs.com/localposts.js.txt
Dump it in your mods as localposts.js
I'm getting no output from the script if I put any number on the command line. With no number argument it works (last 24 hours). Here's an
example:
Nelgin wrote to Gamgee <=-
Re: Re: Posts in the last 24 hours
By: Gamgee to Nelgin on Mon Nov 07 2022 14:55:00
I'm getting no output from the script if I put any number on the command line. With no number argument it works (last 24 hours). Here's an
example:
I see the problem.
Change
var duration=argv[0]*60*60*100;
to
var duration=argv[0]*60*60*1000;
I missed a 0.
Thanks for the report.
Got it, thanks. I really do find this useful.
Simply run jsexec localposts
Not working here in 3.20a:
What's wrong?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 371 |
Nodes: | 16 (2 / 14) |
Uptime: | 174:20:16 |
Calls: | 7,915 |
Files: | 12,983 |
Messages: | 5,797,642 |