*hint* .. you want to test for the aura/buff when the event occurs
If we walk through your code it may help you.
1. Addon is loaded and creates a frame to handle events.
2. Addon registers the UNIT_AURA event to watch for
4. Addon checks to see if Righteous Fury buff is active on player
5. hasrf variable defined but not initialised and thus treated as false
6 to 13 define event handler to handle events being watched ( but not executed at this time )
14. We can now activate the event watching by telling the frame what function to run when handling its watched events.
The addon will now only use the event handler function when UNIT_AURA is triggered. Thus at present your test for Righteous Fury happens once at the beginning but is never tested again.