The problem is that the various chat rooms are stored in the database as numbers, in a way that does not allow consistency. This is at least my understanding on how things work, maybe Zero can shed some more light on this one. Let's take this example:
Your main room is number 0.
The admin creates a permanent room, this gets number 1.
A user creates another room (temporary), which gets number 2.
In the database, messages are all stored in the same table, with a column indicating which room each message was posted in.
So let's assume there are people in every one of the rooms above and they are discussing. Then the users from room 2 log out and soon after that, the room is deleted. Then, the admin decides that he no longer wants room 1 and he deletes that too. And soon after that another user creates a new temporary room, which now gets number 1. People start posting new messages in this new temporary room. Guess what happens?
Messages from the old permanent room, which had number 1 and messages from the new temporary room 1, get mixed up and if you ask for the log, they will show together. This is a byproduct of how the program handles rooms and messages. In order to have proper logs per chat room, the chatrooms should have a unique index, as they are created, which never gets given to another chatroom. And every message stored in the database would be characterized by that index, so that at any time, you can ask for the log of that room, and the program would get the messages, based on that index.
As you understand, this would require a lot of changes in the existing code, and the only one responsible for deciding if this should be done or not, is ZT.
As for logs not showing the Personal Messages, that's easy to do, you just change the query which generates the log, from this:
PHP Code:
$Get_Chat_MSG = $DB_site->query("select m.*,u.*,t.username AS tusername, t.userid AS tuserid from ".TABLE_PREFIX."{$file} m
left join ".TABLE_PREFIX."user u on (u.userid = m.s_postby)
left join ".TABLE_PREFIX."user t on (t.userid = m.s_foruser)
order by m.s_postime DESC LIMIT $startat, $perpage");
to something like this:
PHP Code:
$Get_Chat_MSG = $DB_site->query("select m.*,u.*,t.username AS tusername, t.userid AS tuserid from ".TABLE_PREFIX."{$file} m
left join ".TABLE_PREFIX."user u on (u.userid = m.s_postby)
left join ".TABLE_PREFIX."user t on (t.userid = m.s_foruser)
where s_foruser='0' order by m.s_postime DESC LIMIT $startat, $perpage");
That will give you a reverse-sorted (newer messages first) log, containing only the messages which were public (to all users).
Rgds