Here is the reply of my co-admin:
The little change I made is the different handling of guests and logged in users. For registered users, you can distinguish the different user_id’s although if they are coming from the same ip.
WHERE (user_id > 0 AND user_id = %u)
The second part of the code is aimed to the guests (user_id = 0). Unfortunately, you can’t distinguish two or more guests coming from the same ip. Therefore I only can distinguish the different ip-addresses.
OR (user_id = 0 AND user_ip = %s)
the last part of the sql statement (concerning timeout) is kept.
You should remember, that I only made a quick hack. I did not check the code line by line and therefore it is possible that something else was damaged. But until now, everything works well.
Best reguards, the co-admin.