djnoz, it can be done a lot easier than that on vB3
For this to be applied on a vB3 board, you really should just make a new (secondary) usergroup called "Miserable Users", make it non-public and put people in that group (along with their normal group, ie. the Miserable usergroup has no additional permissions anywhere, it's just important to note the usergroupid). Then in global.php, put the Miserable code and make it dependant on the usergroupid of the Miserable usergroup, check for it in $bbuserinfo[usergroups] (iirc)