- /* Parse packet header */
- packet->flags = (SilcPacketFlags)header[2];
- packet->type = (SilcPacketType)header[3];
-
- if (stream->sc->engine->local_is_router) {
- if (packet->type == SILC_PACKET_PRIVATE_MESSAGE &&
- (packet->flags & SILC_PACKET_FLAG_PRIVMSG_KEY))
- normal = FALSE;
- else if (packet->type != SILC_PACKET_CHANNEL_MESSAGE ||
- (packet->type == SILC_PACKET_CHANNEL_MESSAGE &&
- stream->is_router == TRUE))
- normal = TRUE;
- } else {
- if (packet->type == SILC_PACKET_PRIVATE_MESSAGE &&
- (packet->flags & SILC_PACKET_FLAG_PRIVMSG_KEY))
- normal = FALSE;
- else if (packet->type != SILC_PACKET_CHANNEL_MESSAGE)
- normal = TRUE;
- }
-