if (client->channel) {
list_del(&client->chan_node);
- leaving = (channel_t *)client->channel;
+ leaving = client->channel;
if (leaving->temporary && list_empty(&leaving->clients)) {
leaving_id = leaving->id;
Chan_freeChannel(leaving);
int leaving_id;
/* Do nothing if user already is in this channel */
- if ((channel_t *)client->channel == ch)
+ if (client->channel == ch)
return 0;
Log_debug("Add user %s to channel %s", client->username, ch->name);
/* Only allowed in one channel at a time */
leaving_id = Chan_userLeave(client);
list_add_tail(&client->chan_node, &ch->clients);
- client->channel = (void *)ch;
+ client->channel = ch;
return leaving_id;
}
int offset, packetsize;
voicetarget_t *vt;
- channel_t *ch = (channel_t *)client->channel;
+ channel_t *ch = client->channel;
struct dlist *itr;
if (!client->authenticated || client->mute || client->self_mute || ch->silent)
sendmsg->payload.userState->session = client->sessionId;
sendmsg->payload.userState->name = strdup(client->username);
sendmsg->payload.userState->has_channel_id = true;
- sendmsg->payload.userState->channel_id = ((channel_t *)client->channel)->id;
+ sendmsg->payload.userState->channel_id = client->channel->id;
if (defaultChan->silent) {
sendmsg->payload.userState->has_suppress = true;
sendmsg->payload.userState->session = client_itr->sessionId;
sendmsg->payload.userState->name = strdup(client_itr->username);
sendmsg->payload.userState->has_channel_id = true;
- sendmsg->payload.userState->channel_id = ((channel_t *)client_itr->channel)->id;
- sendmsg->payload.userState->has_suppress = ((channel_t *)client_itr->channel)->silent;
- sendmsg->payload.userState->suppress = ((channel_t *)client_itr->channel)->silent;
+ sendmsg->payload.userState->channel_id = client_itr->channel->id;
+ sendmsg->payload.userState->has_suppress = client_itr->channel->silent;
+ sendmsg->payload.userState->suppress = client_itr->channel->silent;
- client_itr->isSuppressed = ((channel_t *)client_itr->channel)->silent;
+ client_itr->isSuppressed = client_itr->channel->silent;
if (client_itr->self_deaf) {
sendmsg->payload.userState->has_self_deaf = true;