|The XNap Plugin HOWTO|
If you have read through some of XNap's code you might have noticed that it sticks to certain code conventions. I would strongly recommend that you format any code that you would like to submit to the XNap development team accordingly. It makes reading code much easier if it has a common formatting style. It is especially important that your lines do not extend over 78 characters. If you are unsure about the formatting take a look at indent (XNap's root directory contains a .indent.pro file).
We have always had the policy that anybody can edit any code. That also implies that other people will want to read and understand your code. It is not required that every method is documented but the meaning of code should be easy to get. If your function is longer than 40 lines, consider splitting it up.