obviously. I've found that the behavior I want to create with the
command shell that I am writing, specifically within bbs.scan_msgs(), is
not possible utilizing this method/function. I figured, after a bit,
started delving into the .js, .src, and finally the source directory's
.c and .h files, looking for the code for it, to figure out best how to
re-implement (or configure it, if possible). Haven't been able to find
What behaviour are you trying to implement, exactly? There is (usually) enough functionality in the JS API to do just about anything you need to, messagebase-wise.
Unless you're going to modify the source, or are really interested in the vast innards of Synchronet, there isn't much point in looking there. The information is in the JS object model docs, though it's not always obvious. Let us know what you want to do and we can point you in the right direction.
causing me to question myself a bit more) looking through the API, I
started realizing that msg_area.* might be able to provide the low level
functionality I'm looking for. Right now I'm implementing it from a
I'm still relatively new to actually learning the Synchronet SSJS api, obviously. I've found that the behavior I want to create with the
command shell that I am writing, specifically within bbs.scan_msgs(), is not possible utilizing this method/function. I figured, after a bit,
that it wasn't present within the JS API, so far as I could tell, so I started delving into the .js, .src, and finally the source directory's
.c and .h files, looking for the code for it, to figure out best how to re-implement (or configure it, if possible).
Although it's great to have the Synchronet source available to customize, I think it might be better to write your own script in JavaScript to do what y want. The problem with modifying Synchronet's source is that if you ever wa to upgrade your Synchronet binaries, doing so could be difficult, since you would have to re-apply your changes to the source when you upgrade, then re-build it. Also, if that section of code changes significantly, you would have a problem applying your changes. If you implement what you want as a JavaScript script, you wouldn't have to worry about making changes to the Synchronet code when you upgrade.
Aye, that's now what I'm engaged in. :) I understand the difficulties in patching and upgrading; I was just struggling to wrap my head around the problem I was working with in relation to the JavaScript API. Turns out I was neglecting the MsgBase object, due to a misunderstanding of
its proper context. I'm on the path to getting it done properly now. :)
Ah, yes, Synchronet provides good support for accessing its message bases in JavaScript. It's not all completely documented though (the message header object isn't included in the Synchronet JavaScript documentation at http://www.synchro.net/docs/jsobjs.html). You can easily print out the fiel & values in a message header object though (and this goes for any JavaScript object):
bases in JavaScript. It's not all completely documented though (the message header object isn't included in the Synchronet JavaScript documentation at http://www.synchro.net/docs/jsobjs.html). You can
The header is described in the documentation of the MsgBase.save_msg() method, but yeah - just printing out the fields of the object is easy enough (and a good practical example.)
Sysop: | MCMLXXIX |
---|---|
Location: | Prospect, CT |
Users: | 325 |
Nodes: | 10 (0 / 10) |
Uptime: | 02:29:30 |
Calls: | 510 |
Messages: | 220569 |