Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, 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
➜ Preventing save.
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Wed 26 Oct 2005 12:20 AM (UTC) |
Message
| Right now, MUSHclient saves my worlds (I have set it to save on close) even though nothing has changed. This changes the dates and messes up my repository (I keep the files in an SVN repository to update between clients easily). Is there a way I can prevent this, or can an option be implemented to not save if nothing has changed (or follow the option that already exists if only variables have changed). It is far more important for me to not get a message box asking me to save than getting dates changed, though. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #1 on Wed 26 Oct 2005 01:26 AM (UTC) |
Message
| |
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #2 on Wed 26 Oct 2005 01:46 AM (UTC) |
Message
| Hmm, you're right. It doesn't seem to always save the world, but I did a diff on a world that has changed and all that changed was the dates. What's up with that? I can't see why it would save with nothing changing. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #3 on Wed 26 Oct 2005 11:08 PM (UTC) |
Message
| Well it doesn't keep an entire copy of the "before" and "after" and compare them at the last moment. What it does is set a "document is modified" flag whenever it thinks you have changed something (eg. modified a trigger). It tries to be smart and compare the before and after of each field, even if you just look at a trigger and click OK.
However if you change something, eg. the note colour from blue to green, and then (later) from green back to blue, that counts as 2 changes, not zero changes, even though the net effect is that the colour is back to how it was.
There is possibly a bug in MUSHclient, or possibly you are changing things that don't really count (eg. in a plugin). I think a while ago there was a bug where changes (eg. to triggers) in plugins counted as changes when they weren't really a change to the main document.
In fact, a quick browse of the code seems to indicate that is still a problem. Can you isolate it down a bit? By checking GetInfo (111) can you confirm that the problem crops up (ie. the world modified flag is set) after you do something like add a trigger in a plugin? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #4 on Wed 26 Oct 2005 11:12 PM (UTC) Amended on Wed 26 Oct 2005 11:13 PM (UTC) by Poromenos
|
Message
| I'll try. I'm not the type to look at a trigger and press OK, I always press cancel everywhere unless I need to save the changes. I'll do GetInfo from time to time and keep you posted.
Also, I meant that the flag should have been set only if something changed, and I'm not usually reverting the changes I made in a world, so MUSHclient must be setting it erroneously. Not even the variables are changing. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #5 on Thu 27 Oct 2005 12:15 AM (UTC) |
Message
| Something like this (this is in Lua) that will notify you shortly after the document becomes changed. This is simple and doesn't keep a flag to stop doing it multiple times, you would need to disable the timer after the message appears.
<timers>
<timer enabled="y" second="10.00" send_to="12"
>
<send>if GetInfo (111) ~= 0 then
ColourNote ("white", "red", "Document has changed")
end</send>
</timer>
</timers>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,046 posts) Bio
Forum Administrator |
Date
| Reply #6 on Thu 27 Oct 2005 12:32 AM (UTC) |
Message
| I think it is one of these 4 routines:
AddAlias
AddTrigger
AddTriggerEx
EnableTrigger
They were not checking to see if they were executing in a plugin, the other ones were (eg. DeleteTrigger and so on). |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Poromenos
Greece (1,037 posts) Bio
|
Date
| Reply #7 on Thu 27 Oct 2005 01:16 AM (UTC) |
Message
| Yep, it's EnableTrigger. My plugins make heavy use of this and it results in the world getting saved. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | 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.
21,471 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top