Validating a moderated message
From
Nightfox@VERT/DIGDIST to
All on Sat Jan 21 18:10:49 2017
Hi all,ããI'm working on my message reader and have added a method (for sysops) toãvalidate a message that requires moderation. It seems to me the way to do thatãwould be to add the MSG_VALIDATED attribute to a message header and save itãwith msgbase.put_msg_header(), but it seems that if I re-load the messageãheader, it doesn't have the MSG_VALIDATED attribute. msgbase.put_msg_header()ãreturns true, which I'd think would mean it successfully saved the header. I'mãwondering what I might be doing wrong?ããThis is the code I have for the method:ããfunction DigDistMsgReader_ValidateMsg(pSubBoardCode, pMsgNum)ã{ã if (!msg_area.sub[pSubBoardCode].is_moderated)ã return true;ã if ((this.msgbase == null) || !this.msgbase.is_open)ã return false;ãã var validationSuccessful = false;ã var msgHdr = this.msgbase.get_msg_header(false, pMsgNum, false);ã if (msgHdr != null)ã {ã if ((msgHdr.attr & MSG_VALIDATED) == 0)ã {ã msgHdr.attr &= MSG_VALIDATED;ã validationSuccessful = this.msgbase.put_msg_header(false, msgHdr.number,ã msgHdr);ã }ã elseã validationSuccessful = true;ã }ãã return validationSuccessful;ã}ãããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã