@Override
	public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
		if(e.getMessage() instanceof UpdateHeaderEvent) {
			if(((UpdateHeaderEvent)(e.getMessage())).getReadyMessage() == 
					UpdateHeaderEvent.WELCOME_MSG_READY) {
				NetworkEvent netEvent = Events.createNewEvent(ctx.getChannel());
				
				netEvent.setMessage(new WelcomeMessage(
										Database.getSettingsOption(DBConstants.SETTINGS_SERVER_MOTD),
										Sessions.getUserAsSharedNetworkUser(Sessions.getSession(sessionId).getUser())));
				netEvent.send();
				
			} else if(((UpdateHeaderEvent)(e.getMessage())).getReadyMessage() ==
					UpdateHeaderEvent.USER_SYNC_READY) {
				// Send the userSyncEvent when the client is ready for it.
				Sessions.sendUserSyncEvent(sessionId);
			}
		}
		super.messageReceived(ctx, e);
	}