mIRC Homepage
Posted By: nutt3 updateing - 15/05/05 12:44 PM
I want to make an update script soo when someone else in the channel use a script i made, it will auto update.

I made a update script using a download script i found here in another post, soo main script is in one file and the update is in another. Sofar i have tryed to simple download the main script and reload, via the update script and i think it works, but is it the right way of doing it? or is there a better way?
Posted By: MikeChat Re: updateing - 15/05/05 07:14 PM
Based on your description, yes.
You could put a version.txt in the web site that just has the current version number and set up a version check in the script that gets that file and checks it to the version you have loaded. That way it wouldnt DL the script every time you wanted to check for an update.
Posted By: DaveC Re: updateing - 15/05/05 09:59 PM
weeee a script that auto updates, thats a nice opening for infection you crated there.
Posted By: MikeChat Re: updateing - 15/05/05 10:30 PM
no more so than if they loaded a script written by someone of questionable morals in the first place.
Posted By: DaveC Re: updateing - 16/05/05 07:03 AM
That made no sence at all what you said.

If i said leaving a camp fire with smoldering ashes, is a nice opening to starting a forest fire.

You just cant answer it with "no more than pouring petrol on the trees and setting them on fire"

It just isnt a relevent comparasion.
Posted By: Kelder Re: updateing - 16/05/05 08:05 AM
One could state that someone who has scripts that do stuff the users don't expect is of questionable morals smile

As for the thread starter: download a small file with the version number (and maybe some other tags if you need) once in a while (socket scripting or external program or whatever). Then if that number has increased, download some version.txt with the updates and show that to the user. Then you could even ask if the user wants your script to automatically update or not. Just give the user your website url if he chooses not to auto-update.
Posted By: Riamus2 Re: updateing - 16/05/05 01:18 PM
If you want to avoid downloading a file, you can always just use sockets to read the source of the version.txt file. That would solve any chance of a virus being attached to it. I do that with my weather script, though it's actually reading from my download/info page instead of a version.txt file.

As far as auto-updates... you should have options for the users for automatically check for updates, automatically check for and install updates, and do not automatically check for updates. Some people don't like things happening behind their backs.
Posted By: nutt3 Re: updateing - 16/05/05 03:24 PM
thx for the replys, and dont worry smile
© mIRC Discussion Forums