Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix deletion issues #203

Merged
merged 2 commits into from
Aug 4, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Well this seems to be working for #202 right now; skipping deleted bu…
…t not purged messages; just needs more debugging
  • Loading branch information
dgets committed Aug 3, 2015
commit 2e8eef433c8d57a2b4cb449d7df77b74846b512d
24 changes: 17 additions & 7 deletions load/dmbase.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ msg_base = {
}

if ((mHdr.from_ext == user.number) || (mHdr.from == user.alias) ||
(mHdr.from == user.name)) {
(mHdr.from == user.name) || (user.security.level >= 80)) {
//we are go for trying to delete this message
try {
mBase.remove_msg(ndx);
Expand All @@ -539,9 +539,14 @@ msg_base = {
throw new dDocException("deleteMsg() exception",
"Unable to remove_msg(" + ndx + "):" + e.message, 3);
}
}

console.putmsg(red + high_intensity + "Message baleeted . . .\n");
console.putmsg(red + high_intensity + "Message baleeted . . .\n");
} else {
console.putmsg(red + high_intensity + "Unable to baleet message " +
". . .\n");
}



}
},
Expand Down Expand Up @@ -822,7 +827,7 @@ msg_base = {
* true for screen pauses
*/
dispMsg : function(base, ptr, breaks) {
var mHdr, mBody, fHdr;
var mHdr, mIdx, mBody, fHdr;

if (breaks != false) {
breaks = true;
Expand Down Expand Up @@ -867,6 +872,7 @@ msg_base = {
//try/catch this
try {
mHdr = base.get_msg_header(ptr);
mIdx = base.get_msg_index(ptr);
mBody = base.get_msg_body(ptr);
} catch (e) {
console.putmsg(red + "Error fetching mHdr & mBody\nName: " + e.name +
Expand All @@ -892,16 +898,20 @@ msg_base = {
fHdr = "\n" + magenta + high_intensity + mHdr.date + green + " from "
+ cyan + mHdr.from + "\n" + green;

if (breaks) {
if (mIdx.attr & MSG_DELETE) {
console.putmsg(red + "Message Deleted (awaiting purge)\n");
} else {
if (breaks) {
console.putmsg(fHdr + mBody, P_WORDWRAP); // add fHdr into the
// putmsg here so it gets included in the line count for breaks
} else {
} else {
if (userSettings.debug.message_scan) {
console.putmsg("Putting out message next:\n");
}

console.putmsg(fHdr + mBody, (P_NOPAUSE | P_WORDWRAP));
}
}
}

return 0;
},
Expand Down