The descriptions for the Quick-Play Spell of Pain and its Trap counterpart Barrel Behind the door in YGOPRO both read "Activate only when a card's effect that would inflict damage to you is activated. Your opponent takes the damage instead." After some testing of these cards in a Marik-themed Torture deck, I've noticed that half of the versatility of the card is inapplicable. Since the description does not specify that it can only be activated in response to an opponent's card, it should be able to reflect the controller's card effects as well, allowing for devastating blows upon the death of a Granadora or Giant Kozaky, or even a total wipeout upon the activation of Winged Dragon of Ra. (Spell of Pain was notably used to this effect in response to Ring of Destruction in the original anime.)
However, none of these controller-specific effects seem to be able to activate, in my testing. The cards work perfectly well on opponents' card effects - everything from Magic Cylinder to Nightmare Wheel to Winged Kuriboh LV10. However, letting a Giant Kozaky suicide alone on the field with a Spell of Pain or Barrel (set the previous turn) behind it only causes a clumsy loss of 2500 LP. Not a single self-damaging effect seems to allow these two cards to activate.
I'm willing to let Spell of Pain slide because I see that it's been amended in a newer version to read: "When your opponent activates a card or effect that would inflict effect damage to you: Your opponent takes the effect damage from that card or effect, instead." I would ask, then, if this is the version of the card that YGOPRO wants to use, that the description be changed appropriately. However, Barrel Behind the Door contains no such errata; in fact, in three different versions of the card, no "opponent-only" modifier was added. I would hope then, that this card's full effects could be reinstated.
PS - I also tried testing these cards in response to an opponent-owned Lava Golem inflicting its Standby Phase damage on its controller. No change, no activation.