Allow plug-ins hook messages sent to the server

Example script: https://dl.dropboxusercontent.com/s/hofhfgku0ay3ye6/hook_client.pl