I haven't messed around with faction changes, so I'm not 100% sure but this should work:
Code:
function WangFu:Enable()
self:RegisterEvent("CHAT_MSG_COMBAT_FACTION_CHANGE", "FactionChange");
end
function WangFu:FactionChange(arg)
DEFAULT_CHAT_FRAME:AddMessage("Rep changed")
_,_,faction,_,change,rep = strfind(arg, "Your reputation with has (.+) has (.+) (.+) ((.+) reputation (.+)");
end
That should work. The strfind was an example, I don't remember precisely what the rep change line is, but faction/change/rep would catch the faction it changed with, whether it was an increase and by how much. But, it should look something like that.