Courtesy of mc.
Build the CPP file with /znc/bin/znc-buildmod, then copy it to your modules folder (either .znc, or /znc/lib/znc/)
Load it.