Wow yeah !! That's very distubing !! I added a function which check if you have an "active" chat window. I hope that was your request... (Because it's very hard to understand...)
IMPROVED :
- Set chat window on foreground when message is received ONLY when there's no other active chat window
>> AutoForeground