Fork from mod_interact for ejabberd