private void ClearPrimMedia(ISceneChildEntity entity, LSL_Integer face)
{
// LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
// FIXME: Don't perform the media check directly
if (face < 0 || face > entity.GetNumberOfSides() - 1)
return;
IMoapModule module = World.RequestModuleInterface<IMoapModule>();
if (null == module)
throw new Exception("Media on a prim functions not available");
module.ClearMediaEntry(entity, face);
}