-/* Copyright (C) 2010, Martin Johansson <martin@fatbob.nu>
+/* Copyright (C) 2009-2010, Martin Johansson <martin@fatbob.nu>
Copyright (C) 2005-2010, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
msg->payload.reject->type = type;
msg->payload.reject->has_type = true;
Client_send_message(client, msg);
+
+ Log_info("Server reject reason: %s. Disconnecting session %d - %s@%s:%d",
+ reason,
+ client->sessionId,
+ client->playerName,
+ inet_ntoa(client->remote_tcp.sin_addr),
+ ntohs(client->remote_tcp.sin_port));
+
}
static void sendPermissionDenied(client_t *client, const char *reason)
sendmsg->payload.userState->has_channel_id = true;
sendmsg->payload.userState->channel_id = ((channel_t *)client_itr->channel)->id;
- /* XXX - check if self_* is correct */
+ /* Only self_mute/deaf supported */
if (client_itr->deaf) {
sendmsg->payload.userState->has_self_deaf = true;
sendmsg->payload.userState->self_deaf = true;
if (msg->payload.userState->has_channel_id) {
Chan_playerJoin_id(msg->payload.userState->channel_id, client);
}
+ if (msg->payload.userState->plugin_context != NULL) {
+ if (client->context)
+ free(client->context);
+ client->context = strdup(msg->payload.userState->plugin_context);
+ if (client->context == NULL)
+ Log_fatal("Out of memory");
+
+ break; /* Don't inform other users about this state */
+ }
+
/* Re-use message */
Msg_inc_ref(msg);
msg->payload.userState->has_actor = true;
msg->payload.userState->actor = client->sessionId;
Client_send_message_except(NULL, msg);
break;
-
case TextMessage:
msg->payload.textMessage->has_actor = true;
msg->payload.textMessage->actor = client->sessionId;