Shoutbox

IDEA: Scripts should be able to activate / disable them on a per user basis - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: IDEA: Scripts should be able to activate / disable them on a per user basis (/showthread.php?tid=61623)

IDEA: Scripts should be able to activate / disable them on a per user basis by Bram on 06-26-2006 at 06:38 PM

Because on PCs which are shared with verious users right not the script is loaded for everyone, which could cause unwanted problems. What do you think?


RE: IDEA: Scripts should be able to activate / disable them on a per user basis by CookieRevised on 06-26-2006 at 07:03 PM

Maybe....

It could be interesting, but on the other hand it cuold also be very usefull that scripts are loaded globally...

Anyways, if something like that is done it would probably require a total reprogramming of how the engine works. So I doubt this will be done anytime soon (unless Patchou already is working on it).

A way for still doing something like this, but not breaking all the existing scripts and ways of loading, would maybe be to implement the same 'system' as the Custom Sound feature. This too is by default globally, but you can have a private library too....

I guess only Patchou would be able to truely give a decent reply on this...


RE: IDEA: Scripts should be able to activate / disable them on a per user basis by Salem on 06-27-2006 at 07:42 AM

quote:
Originally posted by Bram
Because on PCs which are shared with verious users right not the script is loaded for everyone, which could cause unwanted problems. What do you think?


I didn't come across the fact the script status was for all Messenger accounts, as i'm just about the only user using this computer.

But yes, i think this should be done. Makes MP!L more customizable

~Salem(@)
RE: IDEA: Scripts should be able to activate / disable them on a per user basis by Patchou on 06-27-2006 at 10:48 PM

This was not done because of the way the old plugins used to work. Plugins were enabled/disabled on a per user basis and it proved to be a bad idea and caused various problems.

Scripts are aware of user change, they can provide their own options to enable/disable themselves in different accounts.


RE: IDEA: Scripts should be able to activate / disable them on a per user basis by Mr. Bougo on 06-28-2006 at 05:01 AM

And what about adding a script object with a property like "enabled" ?

So the users who want to enable/disable the scripts on a per user basis can code this feature... And the script object would be useful in other situations, i think...


RE: RE: IDEA: Scripts should be able to activate / disable them on a per user basis by the andyman on 07-01-2006 at 08:41 PM

quote:
Originally posted by Patchou
This was not done because of the way the old plugins used to work. Plugins were enabled/disabled on a per user basis and it proved to be a bad idea and caused various problems.

Scripts are aware of user change, they can provide their own options to enable/disable themselves in different accounts.

It always seemed to work for me and I'd like to see it return too ( http://shoutbox.menthix.net/showthread.php?tid=61...d=682626#pid682626 )

The only scripts I've seen so far that do anything like this are ones which allow different settings of the functions per account - I haven't seen one yet (including in the official database) that allows itself to be enabled/disabled per account.
RE: IDEA: Scripts should be able to activate / disable them on a per user basis by Squelettor on 07-26-2006 at 01:40 AM

What you can do :

In all your script :

on the top :

code:
var email_authorized = new Array("example@truc.fr");
var authorized;


in the OnEvent_Signin (creat it if don't exist)

code:
function OnEvent_Signin(Email)
{
      authorized = false;
      for (var i =0; i<email_authorized.length;i++)
      {
            if (email_authorized[i] ==Messenger.MyEmail)
            {
                   authorized = true:
                   break;
            }
            return;
      }

       //real code of the OnEvent_Signin...
}


and in all the function OnEvent, on the top :

code:
function OnEvent_XXXXXX(....)
{
             if (!authorized)
            {
                   return;
            }

           //real code of the OnEvent_XXXX...
}


If you have a lot of script, It can be long but you just have make this juste 1 on time ^^

Squelettor