In the posts you could check $post[postid] == 0 and !$post[hascustomavatar], so you could maybe do this:
Code:
<vb:if condtiion="$post[userid] == $bbuserinfo[userid] AND $post[avatarid] == 0 AND !$post[hascustomavatar]">
// Post belongs to logged in user and that user doesn't have an avatar
<vb:else />
// Existing avatar code
</vb:if>
I'm not sure if the same check will work on FORUMHOME because I'm not sure if you have the avatar info by default. If it does work, then it would be something like:
Code:
<vb:if condtiion="$bbuserinfo[avatarid] == 0 AND !$bbuserinfo[hascustomavatar]">
// Logged in user has no avatar
</vb:if>