When you say that something isn't working you should clearly state what it is actually doing and what you want it to do.
I'm going to guess that the issue is actually a misunderstanding of how set_user_flags() works. It does not replace any existing flags. It only adds them to the user's already existing flags (using a bit-wise OR with the user's original flags). So, if you want to set a user to have ONLY the flags specified by read_flags() then you first need to clear the user flags.
Quote:
Originally Posted by fysiks
Code:
set_user_flags(id,flags);
Code:
set_user_flags(id, -1);
set_user_flags(id,flags);
|
The documentation for set_user_flags() mentions the bit-wise OR functionality but it does not explicitly state that you clear flags by using a value of -1.
__________________