Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
cf621bf8
Commit
cf621bf8
authored
3 years ago
by
Eric Oulashin
Browse files
Options
Downloads
Patches
Plain Diff
DDMsgReader v1.45: Fixed message scanning & searching issues introduced in the previous version.
parent
764630cf
No related branches found
No related tags found
2 merge requests
!463
MRC mods by Codefenix (2024-10-20)
,
!145
DDMsgReader v1.45: Fixed message scanning & searching issues introduced in the previous version.
Pipeline
#2778
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
xtrn/DDMsgReader/DDMsgReader.js
+28
-27
28 additions, 27 deletions
xtrn/DDMsgReader/DDMsgReader.js
xtrn/DDMsgReader/readme.txt
+2
-2
2 additions, 2 deletions
xtrn/DDMsgReader/readme.txt
xtrn/DDMsgReader/revision_history.txt
+2
-0
2 additions, 0 deletions
xtrn/DDMsgReader/revision_history.txt
with
32 additions
and
29 deletions
xtrn/DDMsgReader/DDMsgReader.js
+
28
−
27
View file @
cf621bf8
...
@@ -112,6 +112,9 @@
...
@@ -112,6 +112,9 @@
* to ensure they only have Synchronet attribute codes.
* to ensure they only have Synchronet attribute codes.
* 2022-02-19 Eric Oulashin Version 1.44
* 2022-02-19 Eric Oulashin Version 1.44
* Releasing this version.
* Releasing this version.
* 2022-02-24 Eric Oulashin Version 1.45
* Fixed message scanning & searching issue introduced in the
* previous version.
*/
*/
...
@@ -232,8 +235,8 @@ if (system.version_num < 31500)
...
@@ -232,8 +235,8 @@ if (system.version_num < 31500)
}
}
// Reader version information
// Reader version information
var READER_VERSION = "1.4
4
";
var READER_VERSION = "1.4
5
";
var READER_DATE = "2022-02-
19
";
var READER_DATE = "2022-02-
24
";
// Keyboard key codes for displaying on the screen
// Keyboard key codes for displaying on the screen
var UP_ARROW = ascii(24);
var UP_ARROW = ascii(24);
...
@@ -1817,6 +1820,13 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
...
@@ -1817,6 +1820,13 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
var continueScan = true;
var continueScan = true;
var userAborted = false;
var userAborted = false;
this.doingMultiSubBoardScan = (subBoardsToScan.length > 1);
this.doingMultiSubBoardScan = (subBoardsToScan.length > 1);
// If the sub-board's access requirements allows the user to read it
// and it's enabled in the user's message scan configuration, then go
// ahead with this sub-board.
// Note: Used to use this to determine whether the user could access the
// sub-board:
//user.compare_ars(msg_area.grp_list[grpIndex].sub_list[subIndex].ars)
// Now using the can_read property.
for (var subCodeIdx = 0; (subCodeIdx < subBoardsToScan.length) && continueScan; ++subCodeIdx)
for (var subCodeIdx = 0; (subCodeIdx < subBoardsToScan.length) && continueScan; ++subCodeIdx)
{
{
subCode = subBoardsToScan[subCodeIdx];
subCode = subBoardsToScan[subCodeIdx];
...
@@ -1828,16 +1838,9 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
...
@@ -1828,16 +1838,9 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
// when the "Searching ..." and "No messages were found" text is
// when the "Searching ..." and "No messages were found" text is
// displayed repeatedly
// displayed repeatedly
console.line_counter = 0;
console.line_counter = 0;
// If the sub-board's access requirements allows the user to read it
// let the user read the sub-board (and toggle betweeen reading and
// and it's enabled in the user's message scan configuration, then go
// listing)
// ahead with this sub-board.
var readOrListRetObj = this.ReadOrListSubBoard(subCode, null, true, true, false, true, READER_MODE_READ);
// Note: Used to use this to determine whether the user could access the
// sub-board:
//user.compare_ars(msg_area.grp_list[grpIndex].sub_list[subIndex].ars)
// Now using the can_read property.
// TODO: It seems ReadOrListSubBoard() does its own loop through
// the sub-boards if the user chooses to go to the next one
var readOrListRetObj = this.ReadOrListSubBoard(subCode, null, true, false, false, false);
console.print("\1n");
console.print("\1n");
console.crlf();
console.crlf();
//if (this.SearchTypePopulatesSearchResults())
//if (this.SearchTypePopulatesSearchResults())
...
@@ -1848,6 +1851,7 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
...
@@ -1848,6 +1851,7 @@ function DigDistMsgReader_SearchMessages(pSearchModeStr, pSubBoardCode, pScanSco
}
}
}
}
this.subBoardCode = subBoardCodeBackup;
this.subBoardCode = subBoardCodeBackup;
console.pause();
}
}
else
else
this.ReadOrListSubBoard(subCode);
this.ReadOrListSubBoard(subCode);
...
@@ -1927,6 +1931,9 @@ function DigDistMsgReader_ClearSearchData()
...
@@ -1927,6 +1931,9 @@ function DigDistMsgReader_ClearSearchData()
// pPromptToGoNextIfNoResults: Optional boolean - Whether or not to prompt the user
// pPromptToGoNextIfNoResults: Optional boolean - Whether or not to prompt the user
// to go onto the next/previous sub-board if there are no
// to go onto the next/previous sub-board if there are no
// search results in the current sub-board. Defaults to true.
// search results in the current sub-board. Defaults to true.
// pInitialModeOverride: Optional (numeric) to override the initial mode in this
// function (READER_MODE_READ or READER_MODE_LIST). If not
// specified, defaults to this.startMode.
//
//
// Return value: An object with the following properties:
// Return value: An object with the following properties:
// stoppedReading: Boolean - Whether or not the user stopped reading.
// stoppedReading: Boolean - Whether or not the user stopped reading.
...
@@ -1934,7 +1941,8 @@ function DigDistMsgReader_ClearSearchData()
...
@@ -1934,7 +1941,8 @@ function DigDistMsgReader_ClearSearchData()
function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
pAllowChgArea, pReturnOnNextAreaNav,
pAllowChgArea, pReturnOnNextAreaNav,
pPauseOnNoMsgSrchResults,
pPauseOnNoMsgSrchResults,
pPromptToGoNextIfNoResults)
pPromptToGoNextIfNoResults,
pInitialModeOverride)
{
{
var retObj = {
var retObj = {
stoppedReading: false
stoppedReading: false
...
@@ -2002,6 +2010,9 @@ function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
...
@@ -2002,6 +2010,9 @@ function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
// Determine whether to start in list or reader mode, depending
// Determine whether to start in list or reader mode, depending
// on the value of this.startMode.
// on the value of this.startMode.
var readerMode = this.startMode;
var readerMode = this.startMode;
// If an initial mode override was specified and is valid, then use it.
if (typeof(pInitialModeOverride) === "number" && (pInitialModeOverride == READER_MODE_READ || pInitialModeOverride == READER_MODE_LIST))
readerMode = pInitialModeOverride;
// User input loop
// User input loop
var selectedMessageOffset = 0;
var selectedMessageOffset = 0;
if (typeof(pStartingMsgOffset) == "number")
if (typeof(pStartingMsgOffset) == "number")
...
@@ -2061,6 +2072,7 @@ function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
...
@@ -2061,6 +2072,7 @@ function DigDistMsgReader_ReadOrListSubBoard(pSubBoardCode, pStartingMsgOffset,
}
}
else if (otherRetObj.messageListReturn)
else if (otherRetObj.messageListReturn)
readerMode = READER_MODE_LIST;
readerMode = READER_MODE_LIST;
break;
case READER_MODE_LIST:
case READER_MODE_LIST:
// Note: Doing the message list is also handled in this.ReadMessages().
// Note: Doing the message list is also handled in this.ReadMessages().
// This code is here in case the reader is configured to start up
// This code is here in case the reader is configured to start up
...
@@ -2883,7 +2895,6 @@ function DigDistMsgReader_ReadMessages(pSubBoardCode, pStartingMsgOffset, pRetur
...
@@ -2883,7 +2895,6 @@ function DigDistMsgReader_ReadMessages(pSubBoardCode, pStartingMsgOffset, pRetur
{
{
if (allowChgMsgArea && !pReturnOnNextAreaNav)
if (allowChgMsgArea && !pReturnOnNextAreaNav)
{
{
console.print("\1nHere!!!! \1p"); // Temporary
var goToNextRetval = this.GoToNextSubBoardForEnhReader(allowChgMsgArea, pPromptToGoToNextAreaIfNoSearchResults);
var goToNextRetval = this.GoToNextSubBoardForEnhReader(allowChgMsgArea, pPromptToGoToNextAreaIfNoSearchResults);
retObj.stoppedReading = goToNextRetval.shouldStopReading;
retObj.stoppedReading = goToNextRetval.shouldStopReading;
if (retObj.stoppedReading)
if (retObj.stoppedReading)
...
@@ -3827,16 +3838,6 @@ function DigDistMsgReader_ListMessages_Lightbar(pAllowChgSubBoard)
...
@@ -3827,16 +3838,6 @@ function DigDistMsgReader_ListMessages_Lightbar(pAllowChgSubBoard)
// S: Sorting options
// S: Sorting options
else if (lastUserInputUpper == "S")
else if (lastUserInputUpper == "S")
{
{
if (user.is_sysop) // Temporary
{
console.gotoxy(1, console.screen_rows);
console.cleartoeol("\1n");
console.gotoxy(1, console.screen_rows);
console.print("\1gSort\1n");
mswait(ERROR_PAUSE_WAIT_MS);
}
// Refresh the help line
// Refresh the help line
DisplayHelpLine(this.msgListLightbarModeHelpLine);
DisplayHelpLine(this.msgListLightbarModeHelpLine);
}
}
...
@@ -6984,9 +6985,9 @@ function DigDistMsgReader_WriteMsgListScreenTopHeader()
...
@@ -6984,9 +6985,9 @@ function DigDistMsgReader_WriteMsgListScreenTopHeader()
// Figure out the message group name & sub-board name
// Figure out the message group name & sub-board name
// For the message group name, we can also use msgbase.cfg.grp_name in
// For the message group name, we can also use msgbase.cfg.grp_name in
// Synchronet 3.12 and higher.
// Synchronet 3.12 and higher.
var msgbase = new MsgBase(this.subBoardCode);
var msgGroupName = msg_area.grp_list[msgbase.cfg.grp_number].description;
var msgGroupName = msg_area.grp_list[msgbase.cfg.grp_number].description;
var subBoardName = "Unspecified";
var subBoardName = "Unspecified";
var msgbase = new MsgBase(this.subBoardCode);
if (msgbase.open())
if (msgbase.open())
{
{
if (msgbase.cfg != null)
if (msgbase.cfg != null)
...
@@ -10536,13 +10537,13 @@ function DigDistMsgReader_PromptAndDeleteSelectedMessages(pPromptLoc, pClearProm
...
@@ -10536,13 +10537,13 @@ function DigDistMsgReader_PromptAndDeleteSelectedMessages(pPromptLoc, pClearProm
{
{
if (promptLocValid)
if (promptLocValid)
{
{
var delMsgsPromptText = replaceAtCodesInStr(this.text.delSelectedMsgsConfirmText);
// If the caller wants to clear the remainder of the row where the prompt
// If the caller wants to clear the remainder of the row where the prompt
// text will be, then do it.
// text will be, then do it.
if (pClearPromptRowAtFirstUse)
if (pClearPromptRowAtFirstUse)
{
{
// Adding 5 to the prompt text to account for the ? and "[X] " that
// Adding 5 to the prompt text to account for the ? and "[X] " that
// will be added when console.noyes() is called
// will be added when console.noyes() is called
var delMsgsPromptText = replaceAtCodesInStr(this.text.delSelectedMsgsConfirmText);
var promptTxtLen = console.strlen(delMsgsPromptText) + 5;
var promptTxtLen = console.strlen(delMsgsPromptText) + 5;
var numCharsRemaining = 0;
var numCharsRemaining = 0;
if (typeof(pPromptRowWidth) == "number")
if (typeof(pPromptRowWidth) == "number")
...
@@ -10556,9 +10557,9 @@ function DigDistMsgReader_PromptAndDeleteSelectedMessages(pPromptLoc, pClearProm
...
@@ -10556,9 +10557,9 @@ function DigDistMsgReader_PromptAndDeleteSelectedMessages(pPromptLoc, pClearProm
}
}
// Move the cursor to the prompt location
// Move the cursor to the prompt location
console.gotoxy(pPromptLoc);
console.gotoxy(pPromptLoc);
}
deleteMsgs = !console.noyes(delMsgsPromptText);
deleteMsgs = !console.noyes(delMsgsPromptText);
}
}
}
// If we are to delete the messages, then delete it.
// If we are to delete the messages, then delete it.
if (deleteMsgs)
if (deleteMsgs)
{
{
...
...
This diff is collapsed.
Click to expand it.
xtrn/DDMsgReader/readme.txt
+
2
−
2
View file @
cf621bf8
Digital Distortion Message Reader
Digital Distortion Message Reader
Version 1.4
4
Version 1.4
5
Release date: 2022-02-
19
Release date: 2022-02-
24
by
by
...
...
This diff is collapsed.
Click to expand it.
xtrn/DDMsgReader/revision_history.txt
+
2
−
0
View file @
cf621bf8
...
@@ -5,6 +5,8 @@ Revision History (change log)
...
@@ -5,6 +5,8 @@ Revision History (change log)
=============================
=============================
Version Date Description
Version Date Description
------- ---- -----------
------- ---- -----------
1.45 2022-02-24 Fixed message scanning & searching issue introduced in the
previous version.
1.44 2022-02-19 Removed the scanScopePromptText text line and used the
1.44 2022-02-19 Removed the scanScopePromptText text line and used the
SubGroupOrAll line (621) from text.dat instead. Also, the
SubGroupOrAll line (621) from text.dat instead. Also, the
reader now supports @-code expansion in configured text
reader now supports @-code expansion in configured text
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment