allow send_event to be called from within modules

resolves the error:
  undefined local variable or method `settings'

when send_event is called from in a module