mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
on parcel set music or media url, at least check it can be parsed as a url
This commit is contained in:
@@ -1882,7 +1882,21 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
/// <param name="url"></param>
|
||||
public void SetMediaUrl(string url)
|
||||
{
|
||||
LandData.MediaURL = url;
|
||||
if (String.IsNullOrWhiteSpace(url))
|
||||
LandData.MediaURL = String.Empty;
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Uri dummmy = new Uri(url, UriKind.Absolute);
|
||||
LandData.MediaURL = url;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[LAND OBJECT]: SetMediaUrl error: {0}", e.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
|
||||
SendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
@@ -1893,7 +1907,21 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||
/// <param name="url"></param>
|
||||
public void SetMusicUrl(string url)
|
||||
{
|
||||
LandData.MusicURL = url;
|
||||
if (String.IsNullOrWhiteSpace(url))
|
||||
LandData.MediaURL = String.Empty;
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Uri dummmy = new Uri(url, UriKind.Absolute);
|
||||
LandData.MediaURL = url;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.ErrorFormat("[LAND OBJECT]: SetMusicUrl error: {0}", e.Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, LandData);
|
||||
SendLandUpdateToAvatarsOverMe();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user