Subj : Re: Synchronet API Documentation? To : echicken From : Mortifis Date : Sun Jul 14 2019 11:37 am > Re: Re: Synchronet API Documentation? > By: Mortifis to Digital Man on Sat Jul 13 2019 22:33:38 > Mo> clear all restrictions, thank you. Is there an easy way to declare a > Mo> flag set variable (I called it NEW_UFLAG_SET as an example) similar to > Mo> NEW_UFLAG_SET = "UFLAG_C | UFLAG_D | UFLAG_E ... etc"; ? > If your goal is to do something like: > user.security.restrictions = NEW_UFLAG_SET; > then your example is close to what you'd want: > const NEW_UFLAG_SET = UFLAG_C|UFLAG_D|UFLAG_E; // And so on > Note that you don't want quotes around the right operand, which would make > it a string instead of a bunch of numbers that you're OR-ing together. > This is kind of a flyswatter approach, which is probably what you want > anyway. If you don't want to overwrite the user's entire flag set, it's > also possible to add a single flag: > user.security.restrictions |= UFLAG_C; > or unset a single flag: > user.security.restrictions &=~ UFLAG_C; Excellent; very helpful, thank you! When life gets tough, drop a gear and disappear! --- þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81 .