Adding source file from http://www.ejabberd.im/mod_filter
Updated to work for modern version of ejabberd