aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/UserAccounts
diff options
context:
space:
mode:
authorDiva Canto2009-12-30 21:00:52 -0800
committerDiva Canto2009-12-30 21:00:52 -0800
commitc664307126e7869f6e7038173561de57be058104 (patch)
tree848f6fad19abdc65cb7c76a4eff67c8de453038a /OpenSim/Server/Handlers/UserAccounts
parentFirst pass at the new login service. Still incomplete, but doesn't disrupt th... (diff)
parentImplement avatar picker queries (diff)
downloadopensim-SC_OLD-c664307126e7869f6e7038173561de57be058104.zip
opensim-SC_OLD-c664307126e7869f6e7038173561de57be058104.tar.gz
opensim-SC_OLD-c664307126e7869f6e7038173561de57be058104.tar.bz2
opensim-SC_OLD-c664307126e7869f6e7038173561de57be058104.tar.xz
Merge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/opensim into presence-refactor
Diffstat (limited to 'OpenSim/Server/Handlers/UserAccounts')
-rw-r--r--OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs25
1 files changed, 3 insertions, 22 deletions
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
index a92148c..544ffea 100644
--- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs
@@ -85,10 +85,8 @@ namespace OpenSim.Server.Handlers.UserAccounts
85 return GetAccount(request); 85 return GetAccount(request);
86 case "getaccounts": 86 case "getaccounts":
87 return GetAccounts(request); 87 return GetAccounts(request);
88 case "createaccount":
89 return CreateAccount(request);
90 case "setaccount": 88 case "setaccount":
91 return SetAccount(request); 89 return StoreAccount(request);
92 } 90 }
93 m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method); 91 m_log.DebugFormat("[PRESENCE HANDLER]: unknown method request: {0}", method);
94 } 92 }
@@ -174,24 +172,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
174 return encoding.GetBytes(xmlString); 172 return encoding.GetBytes(xmlString);
175 } 173 }
176 174
177 byte[] CreateAccount(Dictionary<string, object> request) 175 byte[] StoreAccount(Dictionary<string, object> request)
178 {
179 if (!request.ContainsKey("account"))
180 return FailureResult();
181 if (request["account"] == null)
182 return FailureResult();
183 if (!(request["account"] is Dictionary<string, object>))
184 return FailureResult();
185
186 UserAccount account = new UserAccount((Dictionary<string, object>) request["account"]);
187
188 if (m_UserAccountService.CreateUserAccount(account))
189 return SuccessResult();
190
191 return FailureResult();
192 }
193
194 byte[] SetAccount(Dictionary<string, object> request)
195 { 176 {
196 if (!request.ContainsKey("account")) 177 if (!request.ContainsKey("account"))
197 return FailureResult(); 178 return FailureResult();
@@ -202,7 +183,7 @@ namespace OpenSim.Server.Handlers.UserAccounts
202 183
203 UserAccount account = new UserAccount((Dictionary<string, object>)request["account"]); 184 UserAccount account = new UserAccount((Dictionary<string, object>)request["account"]);
204 185
205 if (m_UserAccountService.SetUserAccount(account)) 186 if (m_UserAccountService.StoreUserAccount(account))
206 return SuccessResult(); 187 return SuccessResult();
207 188
208 return FailureResult(); 189 return FailureResult();