mIRC Home    About    Download    Register    News    Help

Print Thread
An update checker #173600
26/03/07 04:00 PM
26/03/07 04:00 PM
Joined: Mar 2007
Posts: 1
D
DarkBoi Offline OP
Mostly harmless
DarkBoi  Offline OP
Mostly harmless
D

Joined: Mar 2007
Posts: 1
Hey what I'm trying to do is get a script that i'm in the process of making to check back to a main location and make sure it has the newest script, if it does it just continues if it doesn't it downloads the new script and reloads the script to the newest version. Can this be done? can someone point me in the right direction with this?

Re: An update checker [Re: DarkBoi] #173602
26/03/07 05:07 PM
26/03/07 05:07 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
xDaeMoN  Offline
Fjord artisan
X

Joined: Mar 2005
Posts: 420
You will need to use sockets. If you're not familiar with it, google & read some tutorials about them. You can also look at some mIRC update checker snippet/scripts & see how they did it so you may have an idea.


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: An update checker [Re: xDaeMoN] #173604
26/03/07 05:34 PM
26/03/07 05:34 PM
Joined: Jan 2007
Posts: 1,156
Seattle
D
DJ_Sol Offline
Hoopy frood
DJ_Sol  Offline
Hoopy frood
D

Joined: Jan 2007
Posts: 1,156
Seattle
I'll give you the basic idea behind mine.

I have a text file on my server that has each file name and its version number.
When I check for updates I check this file for the versions that are on the script. If any version number is greater or there is something on the server that isnt on my script it says there is an update available.

When you download, I read those .mrc files and overwrite the files in my script. Starting by write -c the file in my script.

This means I need to manually keep that text file on my server up to date. Then in each script.

on *:unload:/remini mirc.ini version $nopath($script)
on *:start:/writeini mirc.ini version $nopath($script) 1

This is where the version information is kept. This shows version 1.

Re: An update checker [Re: DJ_Sol] #173605
26/03/07 06:20 PM
26/03/07 06:20 PM
Joined: Mar 2005
Posts: 420
X
xDaeMoN Offline
Fjord artisan
xDaeMoN  Offline
Fjord artisan
X

Joined: Mar 2005
Posts: 420
I think this reply is for Darkboi. wink


If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
Re: An update checker [Re: DarkBoi] #173618
26/03/07 09:51 PM
26/03/07 09:51 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
Most of my distributed scripts have an updater. I just have it check the download location for the version number (my pages for each script mention the version number). However, none of my scripts will automatically download/"install" updates. I've always felt that although doing so is easier, it feels to me like I'm forcing it on people. Some people don't want to update, or else don't like the idea of a script doing it automatically without their approval. If you want it to do an automatic update, then you would need to download the script and reload it.

There are various socket script examples on the forum. Do a search in this forum for sockopen and you should find some good examples.


Invision Support
#Invision on irc.irchighway.net
Re: An update checker [Re: Riamus2] #173653
27/03/07 05:42 AM
27/03/07 05:42 AM
Joined: Jan 2007
Posts: 1,156
Seattle
D
DJ_Sol Offline
Hoopy frood
DJ_Sol  Offline
Hoopy frood
D

Joined: Jan 2007
Posts: 1,156
Seattle
I offer a dialog that shows you the files available to update and they can select which files they want to update and click update.

xDaemon, I think he can figure it out.

Re: An update checker [Re: DJ_Sol] #173665
27/03/07 01:15 PM
27/03/07 01:15 PM
Joined: Oct 2004
Posts: 8,327
MA, USA
Riamus2 Offline
Hoopy frood
Riamus2  Offline
Hoopy frood

Joined: Oct 2004
Posts: 8,327
MA, USA
Ok. smile

It looked like it did it all automatically, which is why I commented (plus, it was also in response to the OP's request).


Invision Support
#Invision on irc.irchighway.net