X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fmessagehandler.c;h=1e49241890d6252664522f06177a88a3d956e49a;hb=36601a5de5f90e16188deadd271b70595b4cc237;hp=6b77ad445373e5e9d6a4eb7e0a0a7881a26ea500;hpb=63c7a0f3866cc2768009458273632d344e01a058;p=umurmur.git diff --git a/src/messagehandler.c b/src/messagehandler.c index 6b77ad4..1e49241 100644 --- a/src/messagehandler.c +++ b/src/messagehandler.c @@ -1,5 +1,5 @@ -/* Copyright (C) 2009-2012, Martin Johansson - Copyright (C) 2005-2012, Thorvald Natvig +/* Copyright (C) 2009-2013, Martin Johansson + Copyright (C) 2005-2013, Thorvald Natvig All rights reserved. @@ -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;