How about adding:

Code:
 if ($ebeeps) beep


That way if $ebeeps are turned off (user choice) they won't hear those beeps.

Just a suggestion.