sloodle_url_loader.lslp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // The line above should be left blank to avoid script errors in OpenSim.
  3. // Sloodle URL loader
  4. // Allows other scripts to transfer the loading of a *single* URL to another script
  5. // Part of the Sloodle project (www.sloodle.org)
  6. //
  7. // Copyright (c) 2007 Sloodle (various contributors)
  8. // Released under the GNU GPL
  9. //
  10. // Contributors:
  11. // Peter R. Bloomfield
  12. //
  13. //
  14. // When receiving a link message, this script will load a URL for a given user.
  15. // The URL should be in the string, and the user specified by their key.
  16. // The integer number in the link message should be SLOODLE_CHANNEL_OBJECT_LOAD_URL
  17. //
  18. // The purpose of this script is to allow the continued execution of another script,
  19. // even after a link has been presented.
  20. ///// DATA /////
  21. // The link message integer code identifying the message to load a URL
  22. integer SLOODLE_CHANNEL_OBJECT_LOAD_URL = -1639270041;
  23. ///// ---- /////
  24. default
  25. {
  26. link_message( integer sender_num, integer msg_num, string str, key id )
  27. {
  28. // Is this the correct message number and are the variables non-empty?
  29. if (msg_num == SLOODLE_CHANNEL_OBJECT_LOAD_URL && str != "" && id != NULL_KEY)
  30. {
  31. // Load the URL
  32. llLoadURL(id, "", str);
  33. }
  34. }
  35. }
  36. // Please leave the following line intact to show where the script lives in Git:
  37. // SLOODLE LSL Script Git Location: assets/sloodle_url_loader.lslp