I don't think it is being handled (or at least handled correctly) at this moment. The best place to add this check would be, IMHO, to the block handler responsible for the torch / button / ... placement - cBlockTorch in $/source/Blocks/BlockTorch.h etc. You might need to add a new class for buttons, too. Just base it on the torch class, or give them a common ancestor (cAttachedBlock) that implements the generic stuff.
Also, be careful with the word "hook", as in the server it is used exclusively for API hooks that enable plugins to get called on specific events. "attached" is the term you're looking for here
Also, be careful with the word "hook", as in the server it is used exclusively for API hooks that enable plugins to get called on specific events. "attached" is the term you're looking for here