I'm not sure, but I think your problem may be that a session is tied to an ip address, so if you overwrite the ip address in the session table it probably just creates a new session when you reload the page.
About the "$posts = ", if you're doing an update query you don't need to capture the return value. The only thing you can do is check it for TRUE or FALSE to see if it succeeded or not (and it only makes sense to do that if you have a way to handle the error).
In any case, if you just want to hide the ip for that one user you could try this:
Code:
if ($userinfo['userid'] == $vbulletin->options['superadmin_id'])
{
$userinfo['host_encoded'] = 'Hidden'; // or just make it a null string
}