Optimised logic to invoke badge awarding logic

Rather than copy/pasting the hook name, the __FUNCTION__ constant is used. The "_Handler" suffix is then stripped from it, to get the clean hook name. This will reduce the amount of errors due to typos or incorrect copy/paste operations.
Merge pull request #13 from daigo75/master

Optimised code to invoke badge awarding logic