`iuse::pkill`, around line 400 of `iuse.cpp` is like what I'm thinking of. I also sent Rivet-the-Zombie/Cataclysm-DDA#3 that formats this correctly, so you can use that as well.