Well, dagon, for some reason, people from India (where I suspect the OP might be) tend to use the word "doubt" when they mean "question" ... something about translation, I guess.
As to the original question, I'd suggest having a unique ID which is sent along with each line of chat, but I'm no expert on chat systems. Perhaps you should show us the code you having so far?