[Opensim-dev] new LSL state to implement

Mana Janus mana.janus at web.de
Tue Jul 29 10:53:17 UTC 2008


What about using llGetSimulatorHostname()?
If that ends with ".lindenlab.com", you are in the SL grid.

// an example, just from memory, untested
if (llGetSubString(llGetSimulatorHostname(), -14, -1) == ".lindenlab.com") {
    // in second life
} else {
    // probably a OpenSim :-)
}

Yes, I know, that's a bad hack, but should work today. :-)

Regards,

Mana


Lc wrote:
> i agree on that. I will open a jira and we will see ;)
>
> As exercice, I will try to implement the osGetSimulatorVersion :)
>
> but i keep thinking  we need an error handler implementation to make 
> the language more robust and bullerproof.
>
> sm
>
>
> On Tue, Jul 29, 2008 at 10:01 AM, Frisby, Adam <adam at deepthink.com.au 
> <mailto:adam at deepthink.com.au>> wrote:
>
>     True,
>
>      
>
>     But doing it as a state is kind of hacky to say the least.
>
>
>     Perhaps petitioning LL to add a llGetSimulatorVersion(); might be
>     the best solution.
>
>      
>
>     Regards,
>
>      
>
>     Adam
>
>      
>
>     *From:* opensim-dev-bounces at lists.berlios.de
>     <mailto:opensim-dev-bounces at lists.berlios.de>
>     [mailto:opensim-dev-bounces at lists.berlios.de
>     <mailto:opensim-dev-bounces at lists.berlios.de>] *On Behalf Of *Lc
>     *Sent:* Tuesday, 29 July 2008 1:01 AM
>
>     *To:* opensim-dev at lists.berlios.de
>     <mailto:opensim-dev at lists.berlios.de>
>     *Subject:* Re: [Opensim-dev] new LSL state to implement
>
>      
>
>     but any OS functions will depend of the grid itself.
>     I mean OsGetRuntimeEnvironment will failed under any non OS grid
>     unless LL agrreed to add that function in there Core.
>
>     with the event, we are not CoreGrid dependant.
>
>
>     Sm
>
>
>     On Tue, Jul 29, 2008 at 9:51 AM, Frisby, Adam
>     <adam at deepthink.com.au <mailto:adam at deepthink.com.au>> wrote:
>
>     This is much better handled with some kind of additional function.
>
>      
>
>     Perhaps osGetRuntimeEnvironment();
>
>      
>
>     Regards,
>
>      
>
>     Adam
>
>      
>
>     *From:* opensim-dev-bounces at lists.berlios.de
>     <mailto:opensim-dev-bounces at lists.berlios.de>
>     [mailto:opensim-dev-bounces at lists.berlios.de
>     <mailto:opensim-dev-bounces at lists.berlios.de>] *On Behalf Of *Lc
>     *Sent:* Tuesday, 29 July 2008 12:24 AM
>     *To:* opensim-dev at lists.berlios.de
>     <mailto:opensim-dev at lists.berlios.de>
>     *Subject:* [Opensim-dev] new LSL state to implement
>
>      
>
>     hello
>
>     I think it will be wise to implement a new LSL state called OSGrid
>     that will be called everytime a script is run under any OSGrid
>     environment.
>
>     Why do we need that ?
>     We need that system to know on wich environment the script is
>     working and exit nicely if needed.
>
>     This state should be called like the usual default state ONLY
>     under osgrid. It will avoid script crashing nicely.
>
>
>     As usual, this idea is open to comment.
>
>     SM
>     sample:
>
>
>
>
>     default
>     int ok;
>     {
>       state_entry()
>       {
>         llSay(0, "Hello, Avatar!");
>       }
>       
>       touch(integer total_number)
>       {
>         llSay(0, "Touched.");
>         if (ok ==0) {
>            llSay(0,"Sorry, OSgrid only");
>         }
>       }
>     }
>
>     state OSGrid {
>        ok=1;
>        llSay(0,"We are under OS...");
>     }
>
>     }
>
>
>     _______________________________________________
>     Opensim-dev mailing list
>     Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>     https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>      
>
>
>     _______________________________________________
>     Opensim-dev mailing list
>     Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>     https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>   




More information about the Opensim-dev mailing list