aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenSim.Servers
diff options
context:
space:
mode:
Diffstat (limited to 'Common/OpenSim.Servers')
-rw-r--r--Common/OpenSim.Servers/LoginResponse.cs58
-rw-r--r--Common/OpenSim.Servers/LoginServer.cs31
2 files changed, 23 insertions, 66 deletions
diff --git a/Common/OpenSim.Servers/LoginResponse.cs b/Common/OpenSim.Servers/LoginResponse.cs
index debfe43..dc4732c 100644
--- a/Common/OpenSim.Servers/LoginResponse.cs
+++ b/Common/OpenSim.Servers/LoginResponse.cs
@@ -72,7 +72,7 @@ namespace OpenSim.UserServer
72 private ArrayList initialOutfit; 72 private ArrayList initialOutfit;
73 private ArrayList agentInventory; 73 private ArrayList agentInventory;
74 74
75 private UserProfile userProfile; 75 private UserInfo userProfile;
76 76
77 private LLUUID agentID; 77 private LLUUID agentID;
78 private LLUUID sessionID; 78 private LLUUID sessionID;
@@ -131,7 +131,7 @@ namespace OpenSim.UserServer
131 this.uiConfigHash = new Hashtable(); 131 this.uiConfigHash = new Hashtable();
132 132
133 this.defaultXmlRpcResponse = new XmlRpcResponse(); 133 this.defaultXmlRpcResponse = new XmlRpcResponse();
134 this.userProfile = new UserProfile(); 134 this.userProfile = new UserInfo();
135 this.inventoryRoot = new ArrayList(); 135 this.inventoryRoot = new ArrayList();
136 this.initialOutfit = new ArrayList(); 136 this.initialOutfit = new ArrayList();
137 this.agentInventory = new ArrayList(); 137 this.agentInventory = new ArrayList();
@@ -181,28 +181,9 @@ namespace OpenSim.UserServer
181 this.AddClassifiedCategory((Int32)8, "Service"); 181 this.AddClassifiedCategory((Int32)8, "Service");
182 this.AddClassifiedCategory((Int32)9, "Personal"); 182 this.AddClassifiedCategory((Int32)9, "Personal");
183 183
184 int SessionRand = Util.RandomClass.Next(1, 999); 184 this.SessionID = LLUUID.Random();
185 this.SessionID = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797");
186 this.SecureSessionID = LLUUID.Random(); 185 this.SecureSessionID = LLUUID.Random();
187 186 this.AgentID = LLUUID.Random();
188 this.userProfile.Inventory.CreateRootFolder(this.userProfile.UUID, true);
189 this.baseFolderID = this.userProfile.Inventory.GetFolderID("Textures");
190 this.inventoryFolderID = this.userProfile.Inventory.GetFolderID("My Inventory-");
191 Hashtable InventoryRootHash = new Hashtable();
192 InventoryRootHash["folder_id"] = this.userProfile.Inventory.InventoryRoot.FolderID.ToStringHyphenated();
193 this.inventoryRoot.Add(InventoryRootHash);
194
195 Hashtable TempHash;
196 foreach (InventoryFolder InvFolder in this.userProfile.Inventory.InventoryFolders.Values)
197 {
198 TempHash = new Hashtable();
199 TempHash["name"] = InvFolder.FolderName;
200 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
201 TempHash["version"] = (Int32)InvFolder.Version;
202 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
203 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
204 this.agentInventory.Add(TempHash);
205 }
206 187
207 Hashtable InitialOutfitHash = new Hashtable(); 188 Hashtable InitialOutfitHash = new Hashtable();
208 InitialOutfitHash["folder_name"] = "Nightclub Female"; 189 InitialOutfitHash["folder_name"] = "Nightclub Female";
@@ -219,15 +200,6 @@ namespace OpenSim.UserServer
219 200
220 } // SetDefaultValues 201 } // SetDefaultValues
221 202
222 protected virtual LLUUID GetAgentId()
223 {
224 // todo
225 LLUUID Agent;
226 int AgentRand = Util.RandomClass.Next(1, 9999);
227 Agent = new LLUUID("99998888-0100-" + AgentRand.ToString("0000") + "-8ec1-0b1d5cd6aead");
228 return Agent;
229 } // GetAgentId
230
231 private XmlRpcResponse GenerateFailureResponse(string reason, string message, string login) 203 private XmlRpcResponse GenerateFailureResponse(string reason, string message, string login)
232 { 204 {
233 // Overwrite any default values; 205 // Overwrite any default values;
@@ -287,9 +259,6 @@ namespace OpenSim.UserServer
287 this.AddToUIConfig("allow_first_life", this.allowFirstLife); 259 this.AddToUIConfig("allow_first_life", this.allowFirstLife);
288 this.uiConfig.Add(this.uiConfigHash); 260 this.uiConfig.Add(this.uiConfigHash);
289 261
290 // Create a agent and session LLUUID
291 this.agentID = this.GetAgentId();
292
293 responseData["sim_port"] = this.SimPort; 262 responseData["sim_port"] = this.SimPort;
294 responseData["sim_ip"] = this.SimAddress; 263 responseData["sim_ip"] = this.SimAddress;
295 responseData["agent_id"] = this.AgentID.ToStringHyphenated(); 264 responseData["agent_id"] = this.AgentID.ToStringHyphenated();
@@ -320,6 +289,9 @@ namespace OpenSim.UserServer
320 responseData["region_x"] = (Int32)this.RegionX * 256; 289 responseData["region_x"] = (Int32)this.RegionX * 256;
321 responseData["region_y"] = (Int32)this.RegionY * 256; 290 responseData["region_y"] = (Int32)this.RegionY * 256;
322 291
292 //responseData["inventory-lib-root"] = new ArrayList(); // todo
293 //responseData["buddy-list"] = new ArrayList(); // todo
294
323 responseData["login"] = "true"; 295 responseData["login"] = "true";
324 this.xmlRpcResponse.Value = responseData; 296 this.xmlRpcResponse.Value = responseData;
325 297
@@ -355,6 +327,7 @@ namespace OpenSim.UserServer
355 // this.classifiedCategoriesHash.Clear(); 327 // this.classifiedCategoriesHash.Clear();
356 } // SetClassifiedCategory 328 } // SetClassifiedCategory
357 329
330 #region Properties
358 public string Login 331 public string Login
359 { 332 {
360 get 333 get
@@ -667,5 +640,16 @@ namespace OpenSim.UserServer
667 } 640 }
668 } // ErrorMessage 641 } // ErrorMessage
669 642
670 } // LoginResponse 643 #endregion
671} // namespace OpenSim.UserServer \ No newline at end of file 644
645
646 public class UserInfo
647 {
648 public string firstname;
649 public string lastname;
650 public ulong homeregionhandle;
651 public LLVector3 homepos;
652 public LLVector3 homelookat;
653 }
654 }
655} \ No newline at end of file
diff --git a/Common/OpenSim.Servers/LoginServer.cs b/Common/OpenSim.Servers/LoginServer.cs
index 1243147..e5373dd 100644
--- a/Common/OpenSim.Servers/LoginServer.cs
+++ b/Common/OpenSim.Servers/LoginServer.cs
@@ -148,36 +148,14 @@ namespace OpenSim.UserServer
148 148
149 NumClients++; 149 NumClients++;
150 150
151 // Create a agent and session LLUUID
152 // Agent = GetAgentId(first, last);
153 // int SessionRand = Util.RandomClass.Next(1, 999);
154 // Session = new LLUUID("aaaabbbb-0200-" + SessionRand.ToString("0000") + "-8664-58f53e442797");
155 // LLUUID secureSess = LLUUID.Random();
156
157 loginResponse.SimPort = m_simPort.ToString(); 151 loginResponse.SimPort = m_simPort.ToString();
158 loginResponse.SimAddress = m_simAddr.ToString(); 152 loginResponse.SimAddress = m_simAddr.ToString();
159 // loginResponse.AgentID = Agent.ToStringHyphenated(); 153
160 // loginResponse.SessionID = Session.ToStringHyphenated();
161 // loginResponse.SecureSessionID = secureSess.ToStringHyphenated();
162 loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next()); 154 loginResponse.CircuitCode = (Int32)(Util.RandomClass.Next());
163 XmlRpcResponse response = loginResponse.ToXmlRpcResponse(); 155 XmlRpcResponse response = loginResponse.ToXmlRpcResponse();
164 Hashtable responseData = (Hashtable)response.Value; 156 Hashtable responseData = (Hashtable)response.Value;
165 157
166 //inventory 158
167 /* ArrayList InventoryList = (ArrayList)responseData["inventory-skeleton"];
168 Hashtable Inventory1 = (Hashtable)InventoryList[0];
169 Hashtable Inventory2 = (Hashtable)InventoryList[1];
170 LLUUID BaseFolderID = LLUUID.Random();
171 LLUUID InventoryFolderID = LLUUID.Random();
172 Inventory2["name"] = "Textures";
173 Inventory2["folder_id"] = BaseFolderID.ToStringHyphenated();
174 Inventory2["type_default"] = 0;
175 Inventory1["folder_id"] = InventoryFolderID.ToStringHyphenated();
176
177 ArrayList InventoryRoot = (ArrayList)responseData["inventory-root"];
178 Hashtable Inventoryroot = (Hashtable)InventoryRoot[0];
179 Inventoryroot["folder_id"] = InventoryFolderID.ToStringHyphenated();
180 */
181 CustomiseLoginResponse(responseData, first, last); 159 CustomiseLoginResponse(responseData, first, last);
182 160
183 Login _login = new Login(); 161 Login _login = new Login();
@@ -191,11 +169,6 @@ namespace OpenSim.UserServer
191 _login.BaseFolder = loginResponse.BaseFolderID; 169 _login.BaseFolder = loginResponse.BaseFolderID;
192 _login.InventoryFolder = loginResponse.InventoryFolderID; 170 _login.InventoryFolder = loginResponse.InventoryFolderID;
193 171
194 //working on local computer if so lets add to the gridserver's list of sessions?
195 /* if (m_gridServer.GetName() == "Local")
196 {
197 ((LocalGridBase)m_gridServer).AddNewSession(_login);
198 }*/
199 ulong reghand = Helpers.UIntsToLong((regionX * 256), (regionY * 256)); 172 ulong reghand = Helpers.UIntsToLong((regionX * 256), (regionY * 256));
200 AddSession(reghand,_login); 173 AddSession(reghand,_login);
201 174