Subj : Discord webook integration To : All From : Hunter-Z Date : Sat Oct 23 2021 07:27 pm Hello. I used to run a Synchronet BBS in the mid-late 1990s, and set up a modern version in a WinXP VirtualBox VM in 2015 for fun. I recently blew the dust off of this because some friends on Discord were interested in experiencing the BBS thing in a private setting. Since we're using Discord and Synchronet is now heavy into JavaScript, I thought I'd try hooking the two together. I've had limited success using an HTTPRequest from Synchronet's http.js to send POST requests to a Discord webhook URL, but I've run into some issues and limitations that I could use some advice on. I should mention up-front that I'm a novice at JavaScript, so I'm probably going about this all wrong. My native language is C++! +--------------------------+ |Logon/logoff notifications| +--------------------------+ The first thing I tried to do was have Synchronet tell people on Discord when someone logs on or off. Logon works great, even reporting the user and node number. Logoff, on the other hand, is problematic: It seems that regardless of whether I use the fixed event or an on-logoff event-driven external program entry, Synchronet terminates my JavaScript code before it can send the POST request! As an ugly hack, I was able to get it working by having a fixed logoff event call a .BAT file, which in turn calls jsexec -x, but there has to be a better way? I'm also wondering if this is the best way to do any of this in general. What about just creating custom logon/logoff *modules* that wrap the default ones or something? Any suggestions? +-------------------------+ |BBS up/down notifications| +-------------------------+ I'd love to have something notify Discord when the BBS goes up or down, but there isn't an obvious way to do this either. I was able to get a "BBS up" notification to work by creating a timed even that is set to run on *no* days of the week, and to run on (re)init, but this again feels like a hack. I also don't see any way at all to trigger a "BBS down" event. I'm wondering if maybe I should just handle this externally to Synchronet, like maybe via a Windows Task Manager job or something? +------------------------------+ |External Program notifications| +------------------------------+ Edit: Forgot to mention this. It would be great if I could somehow trigger a script when someone enters a door program, without having to edit every door's configuration to integrate it via a batch file or whatever. Any advice/thoughts appreciated. Thanks, - Ben S. / HunterZ .