Lightning generated event

Added an event which is fired before lightning is created. Setting result to deny will suppress the lightning.

EDIT: Reworked according to ScottKillen's suggestions.
EDIT2: I'll redo it for 1.5