| 37 |
} |
} |
| 38 |
|
|
| 39 |
Hashtable requestData = new Hashtable(); |
Hashtable requestData = new Hashtable(); |
| 40 |
requestData.Add("account", account); |
requestData.Add("avatar_account", account); |
| 41 |
|
|
| 42 |
XmlRpcResponse response = DoRequest("get_user_by_account", requestData, authUrl); |
XmlRpcResponse response = DoRequest("get_user_by_account", requestData, authUrl); |
| 43 |
|
|
| 113 |
|
|
| 114 |
} |
} |
| 115 |
|
|
| 116 |
public static UserProfileData GetUserByUuid(string avatarUuid, string authUrl) |
public static RexUserProfileData GetUserByUuid(string avatarUuid, string authUrl) |
| 117 |
{ |
{ |
| 118 |
m_log.Info("[AUTHENTICATIONSERVICE]: GetUserByUuid"); |
m_log.Info("[AUTHENTICATIONSERVICE]: GetUserByUuid"); |
| 119 |
|
|
| 374 |
} |
} |
| 375 |
|
|
| 376 |
Hashtable responseData = (Hashtable)response.Value; |
Hashtable responseData = (Hashtable)response.Value; |
| 377 |
if (responseData != null && responseData.Contains("sessionHash") && responseData.Contains("avatarStorageUrl") && requestData.Contains("gridUrl")) |
if (responseData != null && responseData.Contains("sessionHash") && responseData.Contains("avatarStorageUrl") && responseData.Contains("gridUrl")) |
| 378 |
{ |
{ |
| 379 |
sessionHash = (string)responseData["sessionHash"]; |
sessionHash = (string)responseData["sessionHash"]; |
| 380 |
string gridUrlTemp = (string)responseData["gridUrl"]; |
string gridUrlTemp = (string)responseData["gridUrl"]; |
| 427 |
} |
} |
| 428 |
|
|
| 429 |
Hashtable responseData = (Hashtable)response.Value; |
Hashtable responseData = (Hashtable)response.Value; |
| 430 |
if (responseData != null && responseData.Contains("sessionHash") && responseData.Contains("avatarStorageUrl") && requestData.Contains("gridUrl")) |
if (responseData != null && responseData.Contains("sessionHash") && responseData.Contains("avatarStorageUrl") && responseData.Contains("gridUrl")) |
| 431 |
{ |
{ |
| 432 |
sessionHash = (string)responseData["sessionHash"]; |
sessionHash = (string)responseData["sessionHash"]; |
| 433 |
string gridUrlTemp = (string)responseData["gridUrl"]; |
string gridUrlTemp = (string)responseData["gridUrl"]; |
| 495 |
|
|
| 496 |
} |
} |
| 497 |
|
|
| 498 |
|
public static bool UpdateUserAgent(string agentID, string regionHandle, string currentPos, string currentAddress, string authUrl) |
| 499 |
|
{ |
| 500 |
|
m_log.Info("[AUTHENTICATIONSERVICE]: UpdateUserAgent"); |
| 501 |
|
|
| 502 |
|
try |
| 503 |
|
{ |
| 504 |
|
|
| 505 |
|
if (agentID == null || agentID.Length == 0 || |
| 506 |
|
currentPos == null || currentPos.Length == 0 || |
| 507 |
|
currentAddress == null || currentAddress.Length == 0 || |
| 508 |
|
regionHandle == null || regionHandle.Length == 0 || |
| 509 |
|
authUrl == null || authUrl.Length == 0) |
| 510 |
|
{ |
| 511 |
|
m_log.Warn("[AUTHENTICATIONSERVICE] UpdateUserAgent: Parameters invalid."); |
| 512 |
|
return false; |
| 513 |
|
} |
| 514 |
|
|
| 515 |
|
Hashtable requestData = new Hashtable(); |
| 516 |
|
requestData.Add("agentID", agentID); |
| 517 |
|
requestData.Add("currentPos", currentPos); |
| 518 |
|
requestData.Add("current_address", currentAddress); |
| 519 |
|
requestData.Add("regionhandle", regionHandle); |
| 520 |
|
|
| 521 |
|
XmlRpcResponse response = DoRequest("update_user_agent", requestData, authUrl); |
| 522 |
|
|
| 523 |
|
if (response == null) |
| 524 |
|
{ |
| 525 |
|
m_log.Warn("[AUTHENTICATIONSERVICE] UpdateUserAgent: Response is null."); |
| 526 |
|
return false; |
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
Hashtable responseData = (Hashtable)response.Value; |
| 530 |
|
if (responseData != null && responseData.Contains("update")) |
| 531 |
|
{ |
| 532 |
|
string request = (string)responseData["update"]; |
| 533 |
|
if (request.Equals("success")) |
| 534 |
|
{ |
| 535 |
|
return true; |
| 536 |
|
} |
| 537 |
|
} |
| 538 |
|
|
| 539 |
|
} |
| 540 |
|
catch (Exception e) |
| 541 |
|
{ |
| 542 |
|
m_log.Error("[AUTHENTICATIONSERVICE]: UpdateUserAgent", e); |
| 543 |
|
} |
| 544 |
|
|
| 545 |
|
return false; |
| 546 |
|
} |
| 547 |
|
|
| 548 |
public static bool UpdateUserAgent(string agentID, string agentOnline, string logoutTime, string agentCurrentPosX, string agentCurrentPosY, string agentCurrentPosZ, string authUrl) |
public static bool UpdateUserAgent(string agentID, string agentOnline, string logoutTime, string agentCurrentPosX, string agentCurrentPosY, string agentCurrentPosZ, string authUrl) |
| 549 |
{ |
{ |
| 550 |
m_log.Info("[AUTHENTICATIONSERVICE]: UpdateUserAgent"); |
m_log.Info("[AUTHENTICATIONSERVICE]: UpdateUserAgent"); |
| 568 |
requestData.Add("agentID", agentID); |
requestData.Add("agentID", agentID); |
| 569 |
requestData.Add("agentOnline", agentOnline); |
requestData.Add("agentOnline", agentOnline); |
| 570 |
requestData.Add("logoutTime", logoutTime); |
requestData.Add("logoutTime", logoutTime); |
| 571 |
requestData.Add("agent_CurrentPosX", agentCurrentPosX); |
requestData.Add("agent_currentPosX", agentCurrentPosX); |
| 572 |
requestData.Add("agent_CurrentPosY", agentCurrentPosY); |
requestData.Add("agent_currentPosY", agentCurrentPosY); |
| 573 |
requestData.Add("agent_CurrentPosZ", agentCurrentPosZ); |
requestData.Add("agent_currentPosZ", agentCurrentPosZ); |
| 574 |
|
|
| 575 |
XmlRpcResponse response = DoRequest("update_user_agent", requestData, authUrl); |
XmlRpcResponse response = DoRequest("update_user_agent", requestData, authUrl); |
| 576 |
|
|