Index: /branches/proxy/src/lib/network/handshake.cc
===================================================================
--- /branches/proxy/src/lib/network/handshake.cc	(revision 9260)
+++ /branches/proxy/src/lib/network/handshake.cc	(revision 9261)
@@ -33,4 +33,5 @@
   this->setIsServer(server);
 
+  // register all variable handlers
   orxId_handler = registerVarId( new SynchronizeableInt( &localState.orxId, &remoteState.orxId, "orxonoxId", PERMISSION_ALL ) );
   version_handler = registerVarId( new SynchronizeableInt( &localState.version, &remoteState.version, "version", PERMISSION_ALL ) );
@@ -43,7 +44,8 @@
 
   candel_id = registerVarId( new SynchronizeableInt( &localState.canDel, &remoteState.canDel, "canDel", PERMISSION_ALL ) );
-  
+
   registerVar( new SynchronizeableString( &localState.preferedNickName, &remoteState.preferedNickName, "preferedNickName", PERMISSION_ALL ) );
 
+  // init the local state
   localState.completed = 0;
   localState.error = 0;
@@ -66,4 +68,5 @@
   remoteState.canDel = 0;
 
+  // activate the synchronization process
   this->setSynchronized(true);
   PRINTF(0)("Handshake created clientId = %d\n", clientId);
Index: /branches/proxy/src/lib/network/synchronizeable.cc
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable.cc	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable.cc	(revision 9261)
@@ -222,5 +222,5 @@
   {
     hasPermission = (
-            this->isServer() && (*it)->checkPermission( PERMISSION_SERVER ) ||
+            this->isServer() && (*it)->checkPermission( PERMISSION_MASTER_SERVER ) ||
         this->owner == SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ) ||
             this->isServer() && this->owner != userId && (*it)->checkPermission( PERMISSION_OWNER ) ||
@@ -344,5 +344,5 @@
   {
     if (
-        (*it)->checkPermission( PERMISSION_SERVER ) && networkStream->isUserMasterServer( userId ) ||
+        (*it)->checkPermission( PERMISSION_MASTER_SERVER ) && networkStream->isUserMasterServer( userId ) ||
         (*it)->checkPermission( PERMISSION_OWNER ) && this->owner == userId ||
         networkStream->isUserMasterServer( userId ) && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER ) ||
@@ -361,5 +361,5 @@
     else
     {
-//      PRINTF(0)("DONT SET VAR BECAUSE OF PERMISSION: %s %d %d %d %d %d %d\n", (*it)->getName().c_str(), (*it)->checkPermission( PERMISSION_SERVER ), (*it)->checkPermission( PERMISSION_OWNER ), (*it)->checkPermission( PERMISSION_ALL ), networkStream->isUserServer( userId ), this->owner, userId );
+//      PRINTF(0)("DONT SET VAR BECAUSE OF PERMISSION: %s %d %d %d %d %d %d\n", (*it)->getName().c_str(), (*it)->checkPermission( PERMISSION_MASTER_SERVER ), (*it)->checkPermission( PERMISSION_OWNER ), (*it)->checkPermission( PERMISSION_ALL ), networkStream->isUserServer( userId ), this->owner, userId );
       n = (*it)->getSizeFromBuf( stateTo->data + i, stateTo->dataLength - i );
       //NETPRINTF(0)("%s::setvar %s %d\n", getClassName(), (*it)->getName().c_str(), n);
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_bool.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_bool.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_bool.h	(revision 9261)
@@ -12,5 +12,5 @@
 
   public:
-    SynchronizeableBool( bool * ptrIn, bool * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableBool( bool * ptrIn, bool * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableBool();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_float.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_float.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_float.h	(revision 9261)
@@ -12,5 +12,5 @@
 
   public:
-    SynchronizeableFloat( float * ptrIn, float * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableFloat( float * ptrIn, float * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableFloat();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_int.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_int.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_int.h	(revision 9261)
@@ -12,5 +12,5 @@
 
   public:
-    SynchronizeableInt( int * ptrIn, int * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableInt( int * ptrIn, int * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableInt();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_quaternion.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_quaternion.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_quaternion.h	(revision 9261)
@@ -14,5 +14,5 @@
 
   public:
-    SynchronizeableQuaternion( Quaternion * ptrIn, Quaternion * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableQuaternion( Quaternion * ptrIn, Quaternion * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableQuaternion();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_string.h	(revision 9261)
@@ -15,5 +15,5 @@
 
   public:
-    SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableString( std::string * ptrIn, std::string * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableString();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_uint.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_uint.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_uint.h	(revision 9261)
@@ -12,5 +12,5 @@
 
   public:
-    SynchronizeableUInt( unsigned int * ptrIn, unsigned int * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableUInt( unsigned int * ptrIn, unsigned int * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableUInt();
     
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_var.h	(revision 9261)
@@ -12,7 +12,8 @@
 
 enum {
-  PERMISSION_SERVER = 1,
-  PERMISSION_OWNER  = 2,
-  PERMISSION_ALL    = 4
+  PERMISSION_MASTER_SERVER = 1,
+  PERMISSION_PROXY_SERVER  = 2,
+  PERMISSION_OWNER         = 4,
+  PERMISSION_ALL           = 8
 };
 
@@ -20,5 +21,5 @@
 
   public:
-    SynchronizeableVar( void * ptrIn, void * ptrOut, std::string name, int length, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableVar( void * ptrIn, void * ptrOut, std::string name, int length, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableVar();
 
@@ -28,6 +29,6 @@
      */
     inline bool beWatched(){ return this->bWatched; }
-    
-    /** 
+
+    /**
      * set flag if synchronizeable wants to be informed on changes
      */
@@ -96,5 +97,5 @@
      */
     inline void resetPriority() { this->priority = this->realPriority; }
-    
+
     /**
      * reads actual size from buffer. this is used when size is not constant
@@ -104,5 +105,5 @@
      */
     virtual inline int getSizeFromBuf( byte * buf, int maxLength ){ return this->getSize(); }
-    
+
     /**
      * set variable id
@@ -110,11 +111,11 @@
      */
     inline void setVarId( int id ){ this->varId = id; }
-    
-    /** 
+
+    /**
      * get variable id
      * @return variable id
      */
     inline int getVarId(){ return varId; }
-    
+
     /**
      * set hasChanged
@@ -122,11 +123,11 @@
      */
     inline void setHasChanged( bool changed ){ this->changed = changed; }
-    
-    /** 
+
+    /**
      * get hasChanged
      * @return variable id
      */
     inline bool getHasChanged(){ return changed; }
-    
+
     /**
      * print out variable value
@@ -137,10 +138,10 @@
   private:
     bool bWatched;      //!< true if synchronizeable wants to be informed on changes
-    
+
     int permission;     //!< who is allowed to change this var
     int priority;       //!< priority assigned to var
     int realPriority;   //!< priority assigned to var, increased every time not sent
     int varId;          //!< id to identify varables
-    
+
     bool changed;       //!< true if last readFromBuf changed anything
 
Index: /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_vector.h
===================================================================
--- /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_vector.h	(revision 9260)
+++ /branches/proxy/src/lib/network/synchronizeable_var/synchronizeable_vector.h	(revision 9261)
@@ -14,5 +14,5 @@
 
   public:
-    SynchronizeableVector( Vector * ptrIn, Vector * ptrOut, std::string name, int permission = PERMISSION_SERVER, int priority = 0 );
+    SynchronizeableVector( Vector * ptrIn, Vector * ptrOut, std::string name, int permission = PERMISSION_MASTER_SERVER, int priority = 0 );
     virtual ~SynchronizeableVector();
     
