• User Object USER_DELETED

    From Mortifis@VERT/ALLEYCAT to All on Tue Jul 23 12:52:15 2019
    I am unsure how to restore a user with the user.settings.USER_DELETED orãrestore a USER_INACTIVE any help would be appreciatedãããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
  • From echicken@VERT/ECBBS to Mortifis on Tue Jul 23 13:22:51 2019
    Re: User Object USER_DELETEDã By: Mortifis to All on Tue Jul 23 2019 12:52:15ãã Mo> I am unsure how to restore a user with the user.settings.USER_DELETED orã Mo> restore a USER_INACTIVE any help would be appreciatedããuser.settings &=~ USER_DELETED;ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.comã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From Digital Man@VERT to Mortifis on Tue Jul 23 13:55:16 2019
    Re: User Object USER_DELETEDã By: Mortifis to All on Tue Jul 23 2019 12:52 pmãã > I am unsure how to restore a user with the user.settings.USER_DELETED orã > restore a USER_INACTIVE any help would be appreciatedããUSER_DELETED and USER_INACTIVE are bit flags. An integer can hold many bit flags (typically, 32). In the case of user.settings, each bit as a pre-defined purpose and those bits have been assigned symbolic names (in userdefs.js).ããTo set (add) a bit-flag, you bit-wise "OR" it into the value, like so:ãã user.settings |= USER_DELETED;ããTo unset (remove) a bit-flag, you bit-wise "AND" it with the opposite (bit-wise not) value, like so:ãã user.settings &= ~USER_DELETED;ããHope that helps,ãã digital manããThis Is Spinal Tap quote #6:ãDavid St. Hubbins: He was the patron saint of quality footwear.ãNorco, CA WX: 99.6øF, 30.0% humidity, 4 mph ESE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Mortifis@VERT/ALLEYCAT to echicken on Tue Jul 23 19:07:37 2019
    Re: User Object USER_DELETEDã > By: Mortifis to All on Tue Jul 23 2019 12:52:15ãã > Mo> I am unsure how to restore a user with the user.settings.USER_DELETEDã > Mo> or restore a USER_INACTIVE any help would be appreciatedãã > user.settings &=~ USER_DELETED;ãããinteresting ... that &=~ ... undeletes? no wonder USER_DELETED = 0 didn't workã... thought it was a BOOLEAN o.oããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
  • From Digital Man@VERT to Mortifis on Tue Jul 23 16:07:51 2019
    Re: Re: User Object USER_DELETEDã By: Mortifis to echicken on Tue Jul 23 2019 07:07 pmãã > > Re: User Object USER_DELETEDã > > By: Mortifis to All on Tue Jul 23 2019 12:52:15ã >ã > > Mo> I am unsure how to restore a user with theã > > Mo> user.settings.USER_DELETED or restore a USER_INACTIVE any help wouldã > > Mo> be appreciatedã >ã > > user.settings &=~ USER_DELETED;ã >ã >ã > interesting ... that &=~ ... undeletes?ããIt unsets a bit (or a set of bits). In this example, it's unsetting the "USER_DELETED" bit.ãã > no wonder USER_DELETED = 0 didn'tã > work ... thought it was a BOOLEAN o.oããNope. jsobjs.html is you friend. :-)ãã digital manããSynchronet "Real Fact" #85:ãThe ZMODEM file transfer protocol is limited to files of 4 gigabytes or smaller.ãNorco, CA WX: 97.6øF, 35.0% humidity, 16 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From Mortifis@VERT/ALLEYCAT to echicken on Tue Jul 23 22:40:15 2019
    Re: User Object USER_DELETEDã > By: Mortifis to All on Tue Jul 23 2019 12:52:15ãã > Mo> I am unsure how to restore a user with the user.settings.USER_DELETEDã > Mo> or restore a USER_INACTIVE any help would be appreciatedãã > user.settings &=~ USER_DELETED;ããas learning any language ( obviously I am not C adept) what does ~& or evenãjust ~ mean negate a bitwise?ãããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
  • From echicken@VERT/ECBBS to Mortifis on Tue Jul 23 22:04:55 2019
    Re: Re: User Object USER_DELETEDã By: Mortifis to echicken on Tue Jul 23 2019 22:40:15ãã Mo> as learning any language ( obviously I am not C adept) what does ~& orã Mo> even just ~ mean negate a bitwise?ããhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operatorsãã'~a' inverts the bits of 'a'ãã'a & b' returns ones in positions where both 'a' and 'b' have onesãã'a & ~b' returns ones in positions where both 'a' and the inverse of 'b' have onesãã'a &= b' assigns the result of 'a & b' to 'a'ãã'a &= ~b' assigns the result of 'a & ~b' to 'a'ãã'a | b' returns ones where either 'a' or 'b' have onesãã'a |= b' assigns the result of 'a | b' to 'a'ããSo:ããvar a = 1; // 00000001ãvar b = 2; // 00000010ãa |= b; // a = 00000001 | 00000010ãa &= ~b; // a = 00000011 & 11111101ããif that makes sense.ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.comã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From Mortifis@VERT/ALLEYCAT to echicken on Wed Jul 24 01:15:21 2019
    Re: Re: User Object USER_DELETEDã > By: Mortifis to echicken on Tue Jul 23 2019 22:40:15ãã > Mo> as learning any language ( obviously I am not C adept) what does ~& orã > Mo> even just ~ mean negate a bitwise?ãã > https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/ã > Bitwise_Operatorsãã > '~a' inverts the bits of 'a'ãã > 'a & b' returns ones in positions where both 'a' and 'b' have onesãã > 'a & ~b' returns ones in positions where both 'a' and the inverse of 'b'ã > have onesãã > 'a &= b' assigns the result of 'a & b' to 'a'ãã > 'a &= ~b' assigns the result of 'a & ~b' to 'a'ãã > 'a | b' returns ones where either 'a' or 'b' have onesãã > 'a |= b' assigns the result of 'a | b' to 'a'ãã > So:ãã > var a = 1; // 00000001ã > var b = 2; // 00000010ã > a |= b; // a = 00000001 | 00000010ã > a &= ~b; // a = 00000011 & 11111101ãã > if that makes sense.ããhuh! starting to ... kinda reminds me of 8 bit assembly, thank you, waking myãbrain up again after years of octal sleep :-oããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Thu Aug 8 09:36:57 2019
    Re: User Object USER_DELETEDã > By: Mortifis to All on Tue Jul 23 2019 12:52 pmãã > > I am unsure how to restore a user with the user.settings.USER_DELETED orã > > restore a USER_INACTIVE any help would be appreciatedãã > USER_DELETED and USER_INACTIVE are bit flags. An integer can hold many bitã > flags (typically, 32). In the case of user.settings, each bit as aã > pre-defined purpose and those bits have been assigned symbolic names (inã > userdefs.js).ãã > To set (add) a bit-flag, you bit-wise "OR" it into the value, like so:ãã > user.settings |= USER_DELETED;ãã > To unset (remove) a bit-flag, you bit-wise "AND" it with the oppositeã > (bit-wise not) value, like so:ãã > user.settings &= ~USER_DELETED;ãã > Hope that helps,ãã > digital manããVery helpful ... sorry for taking so long to reply, I was having QWK issuesãããMy doctor said I have the body of a 25 year old ... and the mind of a 10 :-/ãã---ã þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81ã