Hello!
Is it possible to avoid users from setting for themselves the mode +x (hidden IP) or other modes? What should I change in the config file?
How to restrict using usermode +x?
Yes, it's possible (however that will surely decrease users' security). See set::restrict-usermodes in the documentation.