Add new option: --sharenotify "command"

  Execute command when a share is accepted
  (%%w=worker_name %%j=job_id %%t=init_time %%d=difficulty are replaced in the command)

Example: --sharenotify "echo [%t] %w %j/%d >> /var/log/shares.log"

If "-cu" option is specified, the original worker name is preserved

It might be used to insert the share statistics (worker and difficulty) into a database.
  --sharenotify "sh my_sql_script.sh %w %d"

Or many other things. It is also possible to calculate the KH/s of all proxy miner clients.

The implementation probably would need a couple more of eyes!  It is the first time I read this code.