You have to add on your SQL sentence a call to your avatar, then you have to put this var on your templates as you wish and thats all, you can verify on cache query'es, then only you have the mod as you wish, but you have to know php to do this, is a very simple and easy thing so you can do it by yourself, or if you wish when i've some time i check it out for you, i don't use any chat so i have to test and have to make some tests to make it works fine and without problems, because you have to add an adittional avatar or wont and make it works.

Cheers.