Jump to content


User active in chat not correct

It's correct for about 30 minutes after someone joins then if they just sit in chat, but don't refresh the board they drop off the list. My timeout is set to 2000 minutes. The users are still active in Chat and can message even though they don't show on the active users list. Also, the Chat tab still shows the correct number of users.

IP.Content custom block (made by MT)

Board Index stock footer block.

Status: Fixed
Version: 1.3.0
Fixed In: 1.4.1


There is an AJAX ping that hits the forums about once per minute to keep them in the 'active chatters' list. Interestingly, the tab count and the active chatters list is generated from the same exact cache (chatters in cache_store), yet you're indicating one is correct and one isn't.

I would recommend submitting a ticket so we can investigate on your site.
Ticket in, 788296. I nabbed some more diagnostic information while the issue was present. It's all in the ticket.
It's this, and it is confusing.. I remember this from the Parachat days.

        // Two hours of not doing anything...
        if ( $this->memberData['last_activity'] < ( time() - 7200 ) )
            $this->returnString( "no" );

It's FULLY possible for someone to be active in chat and NOT on the forum for 2 hours. At that time, they will fall off the 'active' chatters, but still show on the tab, since that's coming from our servers.

Shouldn't that probably be more along the lines of

        // Two hours of not doing anything...
        if ( $this->memberData['last_activity'] < ( time() - $this->settings['ipchat_inactive_minutes'] ) )
            $this->returnString( "no" );

So that they'd be removed from both? That's.. not GREAT, either, because we're still basing it off the forum last_activity, rather than last activity in chat, which.. As far as I know, we have no way to pull. the 2 hour limit just seems.. Maybe too short?
Hmm, thanks for the additional info.

As I recall, we added a check against the forum last activity for 2 hours in case someone leaves their browser in chat and then goes to bed or something for the night.

I'll think about this a little, but I'm not entirely sure what can be done.

As for the tab count - that doesn't come from our server I thought? I'll double check on that too.
I can understand the reasoning for it to be there, but let me pose another scenario for you.. Something that I do almost every day.

Get up in the morning, load up my board, and launch chat in a pop up... Go about my day with chat open, but not browsing the forums... After 2 hours of inactivity on the forums I don't show up as being active in chat when I really am.

It's entirely possible to load into chat and remain there legitimately for more than 2 hours.
Also, about the tab count in the case above, the cache_store still shows 2 records since there are still 2 people in the chat room. There is a screenshot of the 'chatting' row, with one of the users not showing active, in the ticket # above.
I've removed the check in update.php that checks against your forum last activity. We will have to evaluate if this causes any undesirable side-effects still.