[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  Plugin State directory
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Plugin State directory

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by WillFa   USA  (525 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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.
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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!
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] 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.


6,228 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]