I just pulled down the ejabberd 1.1.1 source and ejabberd_web_admin.erl.statsdx-diff from the contributions list. In the description on this page http://www.ejabberd.im/mod_statsdx it lists ejabberd 1.1.1.
I tried to apply the patch using:
cd ejabberd-1.1.1/src/
patch -p0 < ejabberd_web_admin.erl.statsdx-diff
and I get:
patching file `web/ejabberd_web_admin.erl'
Hunk #1 FAILED at 905.
Hunk #3 succeeded at 2176 (offset 2 lines).
Hunk #4 FAILED at 2224.
2 out of 4 hunks FAILED -- saving rejects to web/ejabberd_web_admin.erl.rej
Maybe the version on the site is old?
You are right; patch updated
You are right, the old patch was against SVN rev 470 (probably ejabberd 1.0.0). I've updated the patch to SVN revision 581, and should apply perfectly to ejabberd 1.1.1.
mod_statdx patch
Ok, I've applied the updated patch to a clean 1.1.1 code base and it works like a champ at least once I figured out that "make install" clobbers the existing ejabberd.cfg.
Might I suggest that "make install" work like Apache and not overwrite an existing configuration file? It should probably create a ejabberd.cfg.dist file if an ejabberd.cfg already exists.