X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fmessagehandler.c;h=1e49241890d6252664522f06177a88a3d956e49a;hb=36601a5de5f90e16188deadd271b70595b4cc237;hp=f075c469d76e0bf54bdf6d5b304352360832adc1;hpb=f4a9bf7bdc936fadb5a5856fd69a85d8b58e7e39;p=umurmur.git diff --git a/src/messagehandler.c b/src/messagehandler.c index f075c46..1e49241 100644 --- a/src/messagehandler.c +++ b/src/messagehandler.c @@ -263,6 +263,10 @@ void Mh_handle_message(client_t *client, message_t *msg) sendmsg->payload.channelState->name = strdup(ch_itr->name); if (ch_itr->desc) sendmsg->payload.channelState->description = strdup(ch_itr->desc); + if (ch_itr->position != 0) { + sendmsg->payload.channelState->has_position = true; + sendmsg->payload.channelState->position = ch_itr->position; + } Log_debug("Send channel info: %s", sendmsg->payload.channelState->name); Client_send_message(client, sendmsg); } @@ -728,6 +732,8 @@ void Mh_handle_message(client_t *client, message_t *msg) newchan = Chan_createChannel(msg->payload.channelState->name, msg->payload.channelState->description); newchan->temporary = true; + if (msg->payload.channelState->has_position) + newchan->position = msg->payload.channelState->position; Chan_addChannel(parent, newchan); msg->payload.channelState->has_channel_id = true; msg->payload.channelState->channel_id = newchan->id;