And it's certainly still a proof of
concept, so unlikely to be a good candidate for full-time use just yet. Also, I don't think it's going to replace message-scans like your reader can/does. Or at least, not yet. Right now, it's a functions pretty well to
Would it be an easy thing to support using Synchronet's stock message scan, but to be able to just swap out the mesage reader interface with a .js script? The difference I'd see useful there would be to be able to support scrolling up & down in the message (for ANSI users).
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Sun Mar 01 2020 12:43 pm
Anything I could do to encourage you to continue your message reader development? It's definitely beneficial to have other developers trying things and attacking problems from a different angle. So I'm certainly not trying to compete with your mod or disaude you from continuing to use/improve upon it. I hope you do.
I know you aren't trying to compete. The main reason I created my message reader was to provide a scrolling interface when reading messages. If that will be part of an officially-included JS script, I actually have no problem with that. And as the author of Synchronet, you are very familiar with the C/C++ source code, so you could probably more easily optimize that code to help the JS scripts perform better, if there are optimizations that can be done.
There are some other features I've added to my reader, and I don't remember now if the stock Synchronet reader does all these:
- The ability to forward a message to a user/email address (I've used this for sending a Dove-Net message to myself to remind myself of something someone said about Synchronet, etc.)
- The ability to save a message to the BBS machine (for sysops)
- Users can download attachments in their personal email
- The ability to switch between the reader and the list of messages in the current sub-board and choose another message to read
- The ability to change to another sub-board from the reader or message list and read/list messages in the other chosen sub-board
Also I like to implement a lightbar interface where possible, for ANSI users (and for non-ANSI terminals, I like to fall back to a more traditional interface).
I can't think of a whole lot that could help with continued development.
One thing though is that when I list the messages, I use get_all_msg_headers() so I can filter out the voting replies, deleted messages, etc., and that can be a little slow if there are many messages in a sub-board. I'm not sure if there's much that can be done to help that though..
w00t! :)
With something like that more officially built into Synchronet, I was considering whether it would be worth it to continue maintaining my own message reader..
Please continue. Until your message reader came along, I used to have to use GoldEd, or download everthing as a QWK packet.
The only things I wish it would do is print some sort of status while it's scanning message bases,
and have the ability to reply to a message in a
different message area (I came across the latter one today, actually)
Otherwise it's the bees knees, and I thank you for it!
I'm not sure what you mean by this? When you reply to a message, you will be replying to the current message in whatever sub-board it's in. Do you mean some sort of cross-post feature? A cross-post wouldn't be a feature of a message reader. With SlyEdit, you can cross-post, and with the cross-posting feature, you could also change the sub-board that your reply will be posted in, in case you want it to be posted in a more appropriate sub-board.
Do you mean some sort of cross-post feature? A cross-post wouldn't be
a feature of a message reader. With SlyEdit, you can cross-post, and
with the cross-posting feature, you could also change the sub-board
that your reply will be posted in, in case you want it to be posted in
a more appropriate sub-board.
How's that work? From sbbs's perspective, an external message editor (e.g. SlyEdit) is just editing a text file (the message text) and possibly a drop file (e.g. result.ed). I'm not clear how you can change the area where a message is being saved from an external message editor.
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Mon Mar 02 2020 02:26 pm
Do you mean some sort of cross-post feature? A cross-post wouldn't be
a feature of a message reader. With SlyEdit, you can cross-post, and
with the cross-posting feature, you could also change the sub-board
that your reply will be posted in, in case you want it to be posted in
a more appropriate sub-board.
How's that work? From sbbs's perspective, an external message editor (e.g. SlyEdit) is just editing a text file (the message text) and possibly a drop file (e.g. result.ed). I'm not clear how you can change the area where a message is being saved from an external message editor.
SlyEdit lets you cross-post by selecting additional areas to post a message in (useful if you want to post a message in different message networks, for instance). SlyEdit uses MsgBase.save_msg() to post the message to sub-boards other than the one currently being posted in. If you want to just change the area where your message is being posted, you can de-select the current sub-board and select another sub-board, and SlyEdit will use MsgBase.save_msg() to post in the other sub-board and will then clear the current message and return an "aborted" code so that Synchronet won't post it in the original sub-board.
SlyEdit lets you cross-post by selecting additional areas to post a
message in (useful if you want to post a message in different message
networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
message to sub-boards other than the one currently being posted in.
If you want to just change the area where your message is being
posted, you can de-select the current sub-board and select another
sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
other sub-board and will then clear the current message and return an
"aborted" code so that Synchronet won't post it in the original
sub-board.
Ewww.... Okay, I guess that "works". So you wouldn't get Synchronet-added signatures and other things that happen when a message is posted may not happen. So I would expect some weird behavior and corner-cases when using that feature of your editor.
SlyEdit lets you cross-post by selecting additional areas to post a
message in (useful if you want to post a message in different message
networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
message to sub-boards other than the one currently being posted in.
If you want to just change the area where your message is being
posted, you can de-select the current sub-board and select another
sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
other sub-board and will then clear the current message and return an
"aborted" code so that Synchronet won't post it in the original
sub-board.
Ewww.... Okay, I guess that "works". So you wouldn't get
Synchronet-added signatures and other things that happen when a
message is posted may not happen. So I would expect some weird
behavior and corner-cases when using that feature of your editor.
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Mon Mar 02 2020 04:43 pm
SlyEdit lets you cross-post by selecting additional areas to post a
message in (useful if you want to post a message in different message
networks, for instance). SlyEdit uses MsgBase.save_msg() to post the
message to sub-boards other than the one currently being posted in.
If you want to just change the area where your message is being
posted, you can de-select the current sub-board and select another
sub-board, and SlyEdit will use MsgBase.save_msg() to post in the
other sub-board and will then clear the current message and return an
"aborted" code so that Synchronet won't post it in the original
sub-board.
Ewww.... Okay, I guess that "works". So you wouldn't get Synchronet-added signatures and other things that happen when a message is posted may not happen. So I would expect some weird behavior and corner-cases when using that feature of your editor.
When cross-posting to other sub-boards that way, SlyEdit will read the user's signature file and append it to the message - so yes, it will get the user's Synchronet signature. The cross-posting feature was something requested from another sysop, and that was the only way I could think of to do it. I'm not sure if there's a better way..
If Synchronet had a JS function or some mechanism to cross-post a user's message to other sub-boards and do everything Synchronet normally does when posting a user's message, that could be useful to SlyEdit.
When cross-posting to other sub-boards that way, SlyEdit will read the
user's signature file and append it to the message - so yes, it will
get the user's Synchronet signature. The cross-posting feature was
something requested from another sysop, and that was the only way I
could think of to do it. I'm not sure if there's a better way..
Right now, there is no "better way" (because Synchronet doesn't have that feature), but messages posted in that fashion are going to be noticeabley different from messages posted "normally", main with regards to the header fields added by sbbs when saving a message and the message text post-processing that happens.
It's probably better to discuss design decisions like that before you go in a "creative" direction. :-) I probably could add some specific support for that feature (maybe in a drop file?) had I known that someone wanted or needed it.
Are you doing proper security checking in your cross-posting support?
If Synchronet had a JS function or some mechanism to cross-post a
user's message to other sub-boards and do everything Synchronet
normally does when posting a user's message, that could be useful to
SlyEdit.
Yeah, I'd never thought about that before. Simply changing which sub-board via a drop file could be done "pretty" easy (not posting to multiple subs). But there are some decisions that are made based on the sub-board's
configuration, before the external editor is even invoked. For example, could someone cross post a message into an Anonymous sub-board? Or a private-only sub-board? If yes, would the message be posted anonymously or privately? Can an email be cross-posted into a sub-board? These seem like potentially problematic scenarios.
Are you doing proper security checking in your cross-posting
support?
As far as a user being able to post? I thought it was, but it looks like I may have gone in the assumption that the sub-board would not be shown available sub-boards to the user if they weren't able to post there.. I'll have to update SlyEdit to ensure the user has permissions to post before doing so.
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Mon Mar 02 2020 09:55 pm
When cross-posting to other sub-boards that way, SlyEdit will read the
user's signature file and append it to the message - so yes, it will
get the user's Synchronet signature. The cross-posting feature was
something requested from another sysop, and that was the only way I
could think of to do it. I'm not sure if there's a better way..
Right now, there is no "better way" (because Synchronet doesn't have that feature), but messages posted in that fashion are going to be noticeabley different from messages posted "normally", main with regards to the header fields added by sbbs when saving a message and the message text post-processing that happens.
It's probably better to discuss design decisions like that before you go in a "creative" direction. :-) I probably could add some specific support for that feature (maybe in a drop file?) had I known that someone wanted or needed it.
Often I try to work with what is provided in the JS API. I saw that MsgBase.post_msg() was available, and at the time I didn't think there would need to be special support added for user message posting. In the future I'll plan on checking with you on things like that.
Are you doing proper security checking in your cross-posting support?
As far as a user being able to post? I thought it was, but it looks like I may have gone in the assumption that the sub-board would not be shown available sub-boards to the user if they weren't able to post there.. I'll have to update SlyEdit to ensure the user has permissions to post before doing so.
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Mon Mar 02 2020 10:00 pm
If Synchronet had a JS function or some mechanism to cross-post a
user's message to other sub-boards and do everything Synchronet
normally does when posting a user's message, that could be useful to
SlyEdit.
Yeah, I'd never thought about that before. Simply changing which sub-board via a drop file could be done "pretty" easy (not posting to multiple subs). But there are some decisions that are made based on the sub-board's
SlyEdit allows posting to multiple sub-boards (i.e., if the message could fit into sub-boards on multiple message networks)..
configuration, before the external editor is even invoked. For example, could someone cross post a message into an Anonymous sub-board? Or a private-only sub-board? If yes, would the message be posted anonymously or privately? Can an email be cross-posted into a sub-board? These seem like potentially problematic scenarios.
SlyEdit checks to see if a sub-board is anonymous and whether to use the user's real name or handle before posting.
The user is not "shown" the JS object model normally, so I'm not sure what mechanism you're to provide the user the option of selecting another sub-board to post to. It's certainly possible to have sub-board that a user can read but not post to. That said, the JS msg_area.grp_list and sub_list arrays are filtered based on "access" (not posting) privileges. The msg_area.sub and msg_area.grp arrays are not filtered based on access (contain all subs/groups on the system, regardless of which is user is currently logged int).
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Tue Mar 03 2020 04:52 pm
The user is not "shown" the JS object model normally, so I'm not sure what mechanism you're to provide the user the option of selecting another sub-board to post to. It's certainly possible to have sub-board that a user can read but not post to. That said, the JS msg_area.grp_list and sub_list arrays are filtered based on "access" (not posting) privileges. The msg_area.sub and msg_area.grp arrays are not filtered based on access (contain all subs/groups on the system, regardless of which is user is currently logged int).
SlyEdit iterates through msg_area.grp_list and then msg_area.grp_list.sub_list to allow the user to select sub-boards to post into. After checking earlier, I remembered SlyEdit already doesn't allow the user to select a sub-board they can't post in.
post into. After checking earlier, I remembered SlyEdit already
doesn't allow the user to select a sub-board they can't post in.
Okay, that's good. What method are using to determine if they can or can't post in a sub?
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Tue Mar 03 2020 09:30 pm
post into. After checking earlier, I remembered SlyEdit already
doesn't allow the user to select a sub-board they can't post in.
Okay, that's good. What method are using to determine if they can or can't post in a sub?
This line of code does the check (msgSubCode is the sub-board code):
if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))
The cross-posting feature was something requested from another
sysop, and that was the only way I could think of to do it.
I'm not sure if there's a better way..
The only things I wish it would do is print some sort of status
while it's scanning message bases,
I'm not sure what you mean? While doing a newscan etc., it does print the sub-board names while it's scanning.
and have the ability to reply to a message in a
different message area (I came across the latter one today,
actually)
I'm not sure what you mean by this? When you reply to a message, you will be replying to the current message in whatever sub-board it's in. Do you mean some sort of cross-post feature? A cross-post wouldn't be a feature of a message reader. With SlyEdit, you can cross-post, and with the cross-posting feature, you could also change the sub-board that your reply will be posted in, in case you want it to be posted in a more appropriate sub-board.
I'm glad you enjoy using it. It seems like Digital Man might be incorporating similar functionality though.
Re: src/sbbs3/js_msgbase.c
By: Nightfox to Digital Man on Mon Mar 02 2020 17:15:38
The cross-posting feature was something requested from another
sysop, and that was the only way I could think of to do it.
I'm not sure if there's a better way..
cross-posting and replying in another area, including the netmail/email area, are features that are certainly missing in the base sbbs offerings... there's been numerous times that i've wanted to reply to someone via netmail or in another area to avoid being offtopic or to provide an answer in private...
You can already reply via netmail with the 'M' command.
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Rampage on Wed Mar 04 2020 10:25:16
You can already reply via netmail with the 'M' command.
i'll be damned! you can! i'm used to that stuff showing in the prompt when reading a message... something like
[N]ext, [P]revious, [R]eply, [M]ail, [O]ther
cross-posting and replying in another area, including the netmail/email area, are features that are certainly missing in the base sbbs offerings... there's been numerous times that i've wanted to reply to someone via netmail or in another area to avoid being offtopic or to provide an answer in private...
This line of code does the check (msgSubCode is the sub-board code):
if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))
Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.
I'm not sure what you mean? While doing a newscan etc., it does
print the sub-board names while it's scanning.
Hmm, it's possible I'm using an older version. When I do a newscan It just hangs at a black screen with a cursor until it finds an area that has new messages. I should probably give my message reading system a once over to verify everything's up to date.
Yeah, that's insufficient. For example, that doesn't check weither
the user has the 'N' restriction and the sub-board is a networked
sub. Instead, you should be checking "can_post" property value of
the sub.
I'll change it to use can_post. But I'm curious why it matters if it's a networked sub? Are there certain conditions where a user wouldn't be able to post on a networked sub?
Yeah, that's insufficient. For example, that doesn't check
weither the user has the 'N' restriction and the sub-board is
a networked sub. Instead, you should be checking "can_post"
property value of the sub.
I'll change it to use can_post. But I'm curious why it
matters if it's a networked sub? Are there certain
conditions where a user wouldn't be able to post on a networked
sub?
This line of code does the check (msgSubCode is the sub-board code):
if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))
Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.
I'll change it to use can_post. But I'm curious why it
matters if it's a networked sub? Are there certain
conditions where a user wouldn't be able to post on a networked
sub?
consider a sysop message area where only sysops are allowed to post but anyone may read...
then you have areas in (eg) fidonet that are restricted to only certain zone, regions, or nets... i'm sure there are other examples where one may read an area but not post in it...
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am
This line of code does the check (msgSubCode is the sub-board code):
if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))
Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.
I'll change it to use can_post. But I'm curious why it matters if it's a networked sub? Are there certain conditions where a user wouldn't be able to post on a networked sub?
Re: src/sbbs3/js_msgbase.c
By: Digital Man to Nightfox on Wed Mar 04 2020 01:38 am
This line of code does the check (msgSubCode is the sub-board code):
if (user.compare_ars(msg_area.sub[msgSubCode].post_ars))
Yeah, that's insufficient. For example, that doesn't check weither the user has the 'N' restriction and the sub-board is a networked sub. Instead, you should be checking "can_post" property value of the sub.
Some of the JS documentation could probably be a little clearer on things like that.
http://www.synchro.net/docs/jsobjs.html
For can_post, the documentation says "user has sufficient access to post messages". That doesn't really sound different from checking post_ars with the user's access requirements. It might be good to have more explanation of things like that in the JS docs so people developing JS mods can have a better idea of when to use each thing.
I'll change it to use can_post. But I'm curious why it
matters if it's a networked sub? Are there certain
conditions where a user wouldn't be able to post on a
networked sub?
consider a sysop message area where only sysops are allowed
to post but anyone may read...
Yep. That could be done by setting the ARS string to SYSOP.
Sysop: | Karloch |
---|---|
Location: | Madrid, Spain |
Users: | 54 |
Nodes: | 8 (0 / 8) |
Uptime: | 121:10:15 |
Calls: | 700 |
Files: | 17,895 |
Messages: | 65,995 |