My question was quite simple, frankly. Most of the code was already written, it was only a matter of adding a small feature.
Thanks for your help, anyway. I'll try to ask on another forum and I'll see if I have more luck.