Update script notification
- Mwthorn
- User
- Posts: 46
- Joined: August 6th, 2016, 8:35 am
- Location: Roskilde, Sjælland, Denmark
- Contact:
Update script notification
Since we have started to collect data on servers using <script-tracker>, could it then respond back to notify the server that there is a new version of the script to download?
And, if possible, it would be neat to type a command to automatically download the newest script available. To save time and easy updated to the latest version. (Maybe a script could do this?)
And, if possible, it would be neat to type a command to automatically download the newest script available. To save time and easy updated to the latest version. (Maybe a script could do this?)
Re: Update script notification
I think there is something to check if you're using the latest scripts already, but we won't add automatic downloads. It's unsafe, as someone could easily add in a script that you don't want and you'd never know.
monkeybot wrote:(717) 2016/05/24 14:37:50 UTC-07:00 <Morphan1> I don't understand how any child could comprehend the flavor of a lighting effect
Re: Update script notification
My scripts already do this... in part. They will notify you if there's a new version of it available and give you a clickable link to the repo so you can download and install if you wish.


We are the music makers, and we are the dreamers of dreams...
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: Update script notification
You can also at any time do:
To check the status of all properly configured repo scripts.
/denizen scriptversions
To check the status of all properly configured repo scripts.
Denizen lead developer. On Discord as
mcmonkey#6666
.- Mwthorn
- User
- Posts: 46
- Joined: August 6th, 2016, 8:35 am
- Location: Roskilde, Sjælland, Denmark
- Contact:
Re: Update script notification
Fair enough.Morphan1 wrote:I think there is something to check if you're using the latest scripts already, but we won't add automatic downloads. It's unsafe, as someone could easily add in a script that you don't want and you'd never know.
Do you mind if I use this for my scripts? the procedure check for versionAnthony wrote:My scripts already do this... in part. They will notify you if there's a new version of it available and give you a clickable link to the repo so you can download and install if you wish.
Neat :) Amazing that this exists in Denizen Builds for 1.8 as wellmcmonkey wrote:You can also at any time do:
/denizen scriptversions
To check the status of all properly configured repo scripts.
-
- Regular
- Posts: 78
- Joined: August 6th, 2016, 1:44 am
Re: Update script notification
it requires the webget command from 1.10Mwthorn wrote:Do you mind if I use this for my scripts? the procedure check for versionlAnthony wrote:My scripts already do this... in part. They will notify you if there's a new version of it available and give you a clickable link to the repo so you can download and install if you wish.
Re: Update script notification
Code: Select all
updateCheck:
- ^if !<server.has_flag[dRegions.Version.Repo]> {
- ~webget "http://www.mcmonkey.org/denizen/repo/version/<s@dRegions_Version.yaml_key[id]>" save:page
- ^flag server "dRegions.Version.Repo:<entry[page].result||unknown>" d:1h
}
- ^define repoVersion '<server.flag[dRegions.Version.Repo]||unknown>'
- ^define currentVersion '<s@dRegions_Version.yaml_key[version]>'
- ^if '%repoVersion%' == 'unknown' {
- run s@msgPrefixed instantly 'def:dRegions|<&7>Unable to check for update! <&7><&o>%currentVersion%<&7> is installed!'
}
else if '%repoVersion%' > '%currentVersion%' {
- run s@msgPrefixed instantly 'def:dRegions|<&7>Update from version <&o>%currentVersion%<&7> to <&o>%repoVersion%<&7>!'
}
else if '%repoVersion%' != '%currentVersion%' {
- run s@msgPrefixed instantly 'def:dRegions|<&7>What happened? You are on version <&o>%currentVersion%<&7> and the repo says <&o>%repoVersion%<&7>!'
}
We are the music makers, and we are the dreamers of dreams...
- mcmonkey
- Site Admin
- Posts: 299
- Joined: August 5th, 2016, 7:27 pm
- Location: Los Angeles, California, USA
- Contact:
Re: Update script notification
Huh. Usually update checkers are just a !=, because versions only form valid numbers half the time.Anthony wrote:Code: Select all
updateCheck: - ^if !<server.has_flag[dRegions.Version.Repo]> { - ~webget "http://www.mcmonkey.org/denizen/repo/version/<s@dRegions_Version.yaml_key[id]>" save:page - ^flag server "dRegions.Version.Repo:<entry[page].result||unknown>" d:1h } - ^define repoVersion '<server.flag[dRegions.Version.Repo]||unknown>' - ^define currentVersion '<s@dRegions_Version.yaml_key[version]>' - ^if '%repoVersion%' == 'unknown' { - run s@msgPrefixed instantly 'def:dRegions|<&7>Unable to check for update! <&7><&o>%currentVersion%<&7> is installed!' } else if '%repoVersion%' > '%currentVersion%' { - run s@msgPrefixed instantly 'def:dRegions|<&7>Update from version <&o>%currentVersion%<&7> to <&o>%repoVersion%<&7>!' } else if '%repoVersion%' != '%currentVersion%' { - run s@msgPrefixed instantly 'def:dRegions|<&7>What happened? You are on version <&o>%currentVersion%<&7> and the repo says <&o>%repoVersion%<&7>!' }
Just look at the Denizen version:
0.9.8
- that's not a valid number, it has two decimals in it.Denizen lead developer. On Discord as
mcmonkey#6666
.Re: Update script notification
Totally valid point. IF your version string is NAN than you won't be able to do numeric comparisons. That being said... i intentionally keep my version strings actual numbers so i can.mcmonkey wrote:Huh. Usually update checkers are just a !=, because versions only form valid numbers half the time.
Just look at the Denizen version:0.9.8
- that's not a valid number, it has two decimals in it.
YMMV
We are the music makers, and we are the dreamers of dreams...
- Mwthorn
- User
- Posts: 46
- Joined: August 6th, 2016, 8:35 am
- Location: Roskilde, Sjælland, Denmark
- Contact:
Re: Update script notification
Using a numeric comparison version check, you could compare and show all the changes from the current version up to the newest.
This would allow a user to decide if the script should be updated or not (of course you should always update, right?).
This would allow a user to decide if the script should be updated or not (of course you should always update, right?).
-
- Regular
- Posts: 78
- Joined: August 6th, 2016, 1:44 am
Re: Update script notification
I just keep my version strings actual numbers cuz its easier yoloAnthony wrote:Totally valid point. IF your version string is NAN than you won't be able to do numeric comparisons. That being said... i intentionally keep my version strings actual numbers so i can.mcmonkey wrote:Huh. Usually update checkers are just a !=, because versions only form valid numbers half the time.
Just look at the Denizen version:0.9.8
- that's not a valid number, it has two decimals in it.
YMMV
Who is online
Users browsing this forum: No registered users and 3 guests