Hello , I am working in xmpp server, specially in ejabberd for past 1.5 year. I basically work in a chat communication applcation what is based on xmpp server. I hope , i can help you on your problem to create a module in server. i did this type of task before for my project.