PHP Code:
new iFlags = get_user_flags(id);
if (iFlags & ADMIN_LEVEL_A)
{
iFlags &= ~ADMIN_LEVEL_A;
remove_user_flags(id);
set_user_flags(id, iFlags);
}
If by flag A you mean immunity (flag "a"), change ADMIN_LEVEL_A to ADMIN_IMMUNITY.
__________________