Formatting cleanup.

0.6.8-post-fixes
Jeff Ames 2009-10-01 01:00:09 +09:00
parent 33515c75e4
commit ee205e7e81
223 changed files with 875 additions and 930 deletions

View File

@ -69,7 +69,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private string m_name = "RemoteAdminPlugin";
private string m_version = "0.0";
//AnakinLohner 0.6.5-post-fixes
//guard for XmlRpc-related methods
private void FailIfRemoteAdminDisabled(string requestName)
{
@ -469,7 +468,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: CreateRegion: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("CreateRegion");
XmlRpcResponse response = new XmlRpcResponse();
@ -477,7 +475,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
lock (rslock)
{
int m_regionLimit = m_config.GetInt("region_limit", 0);
bool m_enableVoiceForNewRegions = m_config.GetBoolean("create_region_enable_voice", false);
bool m_publicAccess = m_config.GetBoolean("create_region_public", true);
@ -561,7 +558,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
region.ExternalHostName = (string) requestData["external_address"];
string masterFirst = (string) requestData["region_master_first"];
@ -989,7 +985,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: CreateUser: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("CreateUser");
XmlRpcResponse response = new XmlRpcResponse();
@ -1101,7 +1096,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: UserExists: new request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("UserExists");
XmlRpcResponse response = new XmlRpcResponse();
@ -1134,7 +1128,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["lastlogin"] = userInfo.UserProfile.LastLogin;
}
response.Value = responseData;
}
catch (Exception e)
@ -1308,7 +1301,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
m_log.Info("[RADMIN]: UpdateUserAccount: request complete");
return response;
}
/// <summary>
@ -1321,7 +1313,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid)
{
m_log.DebugFormat("[RADMIN] updateUserAppearance");
string dmale = m_config.GetString("default_male", "Default Male");
@ -1402,7 +1393,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private void establishAppearance(UUID dest, UUID srca)
{
m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca);
AvatarAppearance ava = m_app.CommunicationsManager.AvatarService.GetUserAppearance(srca);
@ -1423,7 +1413,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
try
{
Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>();
iserv.GetUserInventory(dest, dic.callback);
@ -1434,7 +1423,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (sic.OK && dic.OK)
{
InventoryFolderImpl efolder;
InventoryFolderImpl srcf = sic.root.FindFolderForType(5);
InventoryFolderImpl dstf = dic.root.FindFolderForType(5);
@ -1494,7 +1482,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
ava.SetWearable(i, dw);
}
}
}
else
{
@ -1502,7 +1489,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
m_app.CommunicationsManager.AvatarService.UpdateUserAppearance(dest, ava);
}
catch (Exception e)
{
@ -1512,7 +1498,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
return;
}
///<summary>
@ -1527,7 +1512,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
private bool createDefaultAvatars()
{
// Only load once
if (daload)
@ -1543,10 +1527,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
try
{
string dafn = null;
//AnakinLohner 0.6.5-post-fixes
//m_config may be null if RemoteAdmin configuration secition is missing or disabled in OpenSim.ini
if (m_config != null)
{
@ -1555,7 +1537,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (File.Exists(dafn))
{
XmlDocument doc = new XmlDocument();
string name = "*unknown*";
string email = "anon@anon";
@ -1670,7 +1651,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
if (uic.OK)
try
{
m_log.DebugFormat("[RADMIN] {0} folders, {1} items in inventory",
uic.folders.Count, uic.items.Count);
@ -1699,7 +1679,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
foreach (XmlElement outfit in outfits)
{
m_log.DebugFormat("[RADMIN] Loading outfit {0} for {1}",
GetStringAttribute(outfit,"name","?"), GetStringAttribute(avatar,"name","?"));
@ -1820,7 +1799,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
return true;
}
/// <summary>
@ -1859,7 +1837,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Load OAR Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Load OAR");
XmlRpcResponse response = new XmlRpcResponse();
@ -1962,7 +1939,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Save OAR Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Save OAR");
XmlRpcResponse response = new XmlRpcResponse();
@ -2003,7 +1979,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
IRegionArchiverModule archiver = scene.RequestModuleInterface<IRegionArchiverModule>();
if (archiver != null)
{
scene.EventManager.OnOarFileSaved += RemoteAdminOarSaveCompleted;
@ -2014,11 +1989,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else
throw new Exception("Archiver module not present for scene");
responseData["saved"] = true;
response.Value = responseData;
}
catch (Exception e)
{
@ -2045,7 +2018,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Load XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Load XML");
XmlRpcResponse response = new XmlRpcResponse();
@ -2129,12 +2101,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
}
public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Save XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Save XML");
XmlRpcResponse response = new XmlRpcResponse();
@ -2220,7 +2190,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Query XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Query XML");
XmlRpcResponse response = new XmlRpcResponse();
@ -2255,9 +2224,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
else throw new Exception("neither region_name nor region_uuid given");
Scene s = m_app.SceneManager.CurrentScene;
int health = s.GetHealth();
responseData["health"] = health;
response.Value = responseData;
@ -2280,7 +2247,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
m_log.Info("[RADMIN]: Received Command XML Administrator Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Command XML");
XmlRpcResponse response = new XmlRpcResponse();
@ -2320,10 +2286,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListClear(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Access List Clear Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Clear");
XmlRpcResponse response = new XmlRpcResponse();
@ -2360,7 +2324,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
s.RegionInfo.EstateSettings.EstateAccess = new UUID[]{};
if (s.RegionInfo.Persistent)
s.RegionInfo.EstateSettings.Save();
}
catch (Exception e)
{
@ -2368,7 +2331,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false;
responseData["error"] = e.Message;
}
finally
{
@ -2381,10 +2343,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListAdd(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Access List Add Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Add");
XmlRpcResponse response = new XmlRpcResponse();
@ -2419,7 +2379,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int addk = 0;
if (requestData.Contains("users"))
if (requestData.Contains("users"))
{
UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
Scene s = m_app.SceneManager.CurrentScene;
@ -2450,7 +2410,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
responseData["added"] = addk;
}
catch (Exception e)
{
@ -2458,7 +2417,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false;
responseData["error"] = e.Message;
}
finally
{
@ -2471,10 +2429,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListRemove(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Access List Remove Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List Remove");
XmlRpcResponse response = new XmlRpcResponse();
@ -2509,7 +2465,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
int remk = 0;
if (requestData.Contains("users"))
if (requestData.Contains("users"))
{
UserProfileCacheService ups = m_app.CommunicationsManager.UserProfileCacheService;
Scene s = m_app.SceneManager.CurrentScene;
@ -2539,7 +2495,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
responseData["removed"] = remk;
}
catch (Exception e)
{
@ -2547,7 +2502,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false;
responseData["error"] = e.Message;
}
finally
{
@ -2560,10 +2514,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public XmlRpcResponse XmlRpcAccessListList(XmlRpcRequest request, IPEndPoint remoteClient)
{
m_log.Info("[RADMIN]: Received Access List List Request");
//AnakinLohner 0.6.5-post-fixes
FailIfRemoteAdminDisabled("Access List List");
XmlRpcResponse response = new XmlRpcResponse();
@ -2610,7 +2562,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
responseData["users"] = users;
}
catch (Exception e)
{
@ -2618,7 +2569,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
responseData["success"] = false;
responseData["error"] = e.Message;
}
finally
{
@ -2695,12 +2645,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public void Dispose()
{
}
}
class UICallback
{
private Object uilock = new Object();
internal InventoryFolderImpl root = null;
internal List<InventoryFolderImpl> folders;
@ -2720,7 +2668,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
public void GetInventory()
{
Dictionary<UUID, InventoryFolderImpl> fmap = new Dictionary<UUID, InventoryFolderImpl>();
if (OK == false)
@ -2774,8 +2721,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
{
fmap[item.Folder].Items.Add(item.ID, item);
}
}
}
}

View File

@ -76,7 +76,7 @@ namespace OpenSim.Framework
public UUID RegionUUID
{
get { return regionUUID;}
get { return regionUUID; }
}
private UUID regionUUID;