Anyway, I have another question related to user flags. This time I'd like to prevent something to be forced on admins that have ADMIN_IMMUNITY. It's about this piece of code:
Code:
if (get_cvar_num(CVAR_FORCEFORUMNAME))
force_forumname(id, oldname, authid)
It forces a name on the player, regardless immunity. I looked at the code of some other plugins and and Hawk552's code as posted above, and I thought this would do the trick :
Code:
if(!(get_user_flags(id) & ADMIN_IMMUNITY))
{
return PLUGIN_CONTINUE
}
if (get_cvar_num(CVAR_FORCEFORUMNAME))
force_forumname(id, oldname, authid)
It compiles just fine, but it still doesn't respect the immunity. Has anyone got a suggestion ?
__________________