Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ Plugin State directory

Plugin State directory

Posting of new messages is disabled at present.

Refresh page


Posted by WillFa   USA  (525 posts)  Bio
Date Mon 19 Jul 2010 01:17 AM (UTC)
Message
Nick,

Would it be possible to add an AlphaOption for the state directory instead of just tacking it on to the plugins dir?

I use Live Mesh to sync some plugins I write with my clan, and I'd like to default to this synced dir for plugins, but don't really need to sync my state to them.

Thanks
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 19 Jul 2010 01:22 AM (UTC)
Message
Do you want to set it or test it?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #2 on Mon 19 Jul 2010 01:38 AM (UTC)
Message
Set please (and test while you're at it)

I pretty much want to move it from under the plugins directory so it's not synced.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 19 Jul 2010 03:46 AM (UTC)
Message
There is no provision for changing global options (other than doing it yourself with the SQLite interface).

However I have moved the hard-coded plugins/state directory into a global option, which you can test with GetGlobalOption, and change yourself if you fiddle with the database.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #4 on Mon 19 Jul 2010 05:24 AM (UTC)
Message
that's cool. I have no problem fiddling with databases. :) Thanks Nick.
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #5 on Tue 20 Jul 2010 12:57 AM (UTC)
Message
I wanted to add a couple of small things.

The default of "./worlds/plugins/state" is based off the current directory, which can change in the shortcut. It may be a more reliable solution to base the default off the user's Plugin Directory (GetInfo(60)) instead of the MC install dir.

It should be noted in the documentation that this string expects the trailing backslash on the path. i.e. "C:\Users\Foo\Documents\PluginStates\"


Thanks again!
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #6 on Tue 20 Jul 2010 02:14 AM (UTC)
Message
The default in a new execution is:


{ GLB_ALPHA_OPT (m_strPluginsDirectory         ), "PluginsDirectory", ".\\worlds\\plugins\\" },
{ GLB_ALPHA_OPT (m_strDefaultStateFilesDirectory), "StateFilesDirectory", ".\\worlds\\plugins\\state\\" },


So really, the state directory should be the same as before (since it was previously the plugins directory with state\ appended to it).


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #7 on Tue 20 Jul 2010 02:15 AM (UTC)
Message
WillFa said:

It should be noted in the documentation that this string expects the trailing backslash on the path. i.e. "C:\Users\Foo\Documents\PluginStates\"



Where in the documentation? It isn't easily changed anyway.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #8 on Tue 20 Jul 2010 02:20 AM (UTC)

Amended on Tue 20 Jul 2010 02:21 AM (UTC) by WillFa

Message
Nick Gammon said:

The default in a new execution is:


{ GLB_ALPHA_OPT (m_strPluginsDirectory         ), "PluginsDirectory", ".\\worlds\\plugins\\" },
{ GLB_ALPHA_OPT (m_strDefaultStateFilesDirectory), "StateFilesDirectory", ".\\worlds\\plugins\\state\\" },


So really, the state directory should be the same as before (since it was previously the plugins directory with state\ appended to it).




But you're going to have a lot of upgrading users that may have changed their plugin directory. "StateFilesDirectory" is new, but "PluginsDirectory" is an existing (possibly changed) value.

And, if they're like me, the Plugins folder may have just been moved out of C:\Program...\worlds, which is going to cause a lot of errors for them as the directory structure doesn't exist.
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #9 on Tue 20 Jul 2010 04:21 AM (UTC)
Message
OK, well hopefully 4.55 will do that for you.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,702 views.

Posting of new messages is disabled at present.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.