mod_rayo: add event handling
mod_rayo: fix segfault on last commit