Anonymous users are able to access chat nodes (not chatrooms) although they do not have permissions to do so. I've tried to comment out the hook_node_access (2 functions) and clear cache/rebuild permissions without success.

Note that this is not a permission problem as all AJAX calls result in forbidden for anonymous users, but they do see the chat history.

What I've done now (and I'm sure it's wrong)

function chatroom_chat_view($node, $view_mode) {
  global $user;
  if ($user->uid == 0) {

But since I'll be creating links in menus that I would want to show up for logged in users only. This is definitely not the way to fix it. I thought that hook_node_access was the only hook that might be meddling around, what else could it be?