Hey DM,
Is ptridx static throughout the life of a sub?
I assuming this is a unique ID for each sub that doesnt change (unless the sub is deleted/recreated). IE: Its not affected by peer subs in the same message area that get added/removed?
Is ptridx static throughout the life of a sub?Correct.
But note: the pointer index is hardly used now in Synchronet. We moved the users' new-msg-scan configs/ptrs from the old .ixb files to .subs (.ini) files 6 years ago.
I'm not using it to determine when mail was last read (and what mail is new) - I'm using it to query details of a particular sub via msg_area.grp_list.sub_list. I want to be sure that sub "x" is the same sub (x) as the last time I queried it (which might be a minute ago, a day ago, a year ago) - even if other subs (in the same grp) have been added/deleted/edited since I last queried it.
The best way to uniquely identify a sub-board is via its internal code. Then can also reference a sub quickly/easily via msg_area.sub[internal_code].
Re: ptridx in msg_area.grp_list.sub_list
By: Digital Man to deon on Mon Dec 02 2024 11:29 pm
Howdy,
The best way to uniquely identify a sub-board is via its internal code. Then can also reference a sub quickly/easily via msg_area.sub[internal_code].
Yeah, that's not helping me with what I'm wanting. internal_code's can be changed, which would throw off what I'm trying to do.
Sorry, you've given me other answers to my question, so I want to confirm - and I'll create an example.
Lets say I have Sub Board "foo" (internal code GRP-FOO), which in scfg you edit that sub board, under "Advanced Options", its states "Point File Index" and a number, eg: 23.
This number 23 corresponds to a JS object call to msg_area.grp_list[x].sub_list[y].ptridx with a value of 23. ("y" is not necessary 23), that is this Sub Board - correct?
So "foo" will always have ptridx = 23 until it is deleted - correct?
Nothing else will result in that value being changed?
If I was to go through all the results of msg_area.grp_list[x].sub_list - only 1 will have a value of ptridx=23, which is this sub board?
I see you are planning other things with (other?) instances of ptridx - are you planing on getting rid of this value in the sub board config too?
SBBS only uses the sub ptridx for one use case currently, and that use case is on the chopping block (issue #832). I can leave the property/config option if there are other uses for sub's ptridx however. But I still think the sub's internal code is the best "unique identifier" for a sub-board.
Technically, pointer file indexes can be changed (in SCFG) too. Changing a sub's internal code (once the sub has messages, is in use) is not normally recommended, but I don't have the "Danger!" warnings in SCFG like I do for the pointer file index.
Nothing else will result in that value being changed?
Not automatically, no, but there is that SCFG options... :-)
SBBS only uses the sub ptridx for one use case currently, and that use case is on the chopping block (issue #832). I can leave the property/config option if there are other uses for sub's ptridx however. But I still think the sub's internal code is the best "unique identifier" for a sub-board.
What I dont like about the "internal code", is it can be changed in two places - in the group and the sub, and there is no "think about what you are doing" warning.
I know these values shouldnt change often, but somebody might want to change them for cosmetic reasons (among other reasons) and mess "other" things up as a result.
Appreciate your reply :)
Sysop: | Scottrudy |
---|---|
Location: | Fremont, CA |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 41:36:54 |
Calls: | 42 |
Messages: | 23,040 |