mIRC Home    About    Download    Register    News    Help

Print Thread
#7126 18/01/03 03:41 AM
Joined: Jan 2003
Posts: 87
T
Tat Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Jan 2003
Posts: 87
mIRC should have someway to autoupdate servers.ini from the main site. Also, the list should be better managed, but just basic autoupdate stuff would be nice. Heck, if you wanted to go crazy it would be very nice to have mIRC autoupdate itself. Check for a new version ect... The servers.ini file would take like no time to do.

#7127 18/01/03 11:59 AM
Joined: Dec 2002
Posts: 5
J
Jah Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: Dec 2002
Posts: 5
This is possible through scripting... take the challenge!

For example a script which updates servers.ini from mirc.co.uk/servers.ini

  • Info:
    There is a comment in the servers.ini giving the update-date which could be used as a "version" for checking if an update is neccesary.
  • Implementation:
    Every 1st of the month/on START or whenever... connect to mirc.co.uk to retrieve the servers.ini (eg. using a socket connection; write output to a file and read the "version". Or just read the "version" from the output).

    Anyway if you had this "version"...
    If the new-version is actually newer than the current-version...
    Then you could do something like:

    - Simple method:
    Do something like replace old-ini with new-ini

    - More advanced method:
    Replace all [servers] items with all items from the new servers.ini keeping the [custom servers] items.

    - "Something completely different"


    The first option has drawbacks relating to the user being able to edit the servers.ini through mirc (editing/adding/deleting servers in the Options->Connect dialog).

    The second option's servers.ini is NOT standard (It has have two blocks). Unfortunately the second block [custom servers] will not be listed in the mirc-server-management-dialog so a custom-management-dialog would be needed. wink
  • Conclusion:
    - You could always google it.
    - A similar method could be used for updating mIRC itself.


--Jah



#7128 21/01/03 11:49 AM
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
Just some comments on the script you purpose:
-You should probably check the date from the Last-Modified HTTP response header, that way you won
't be dependant on the guys from www.mirc.co.uk always putting the date in a comment on the 3rd line. Also, you should check the date as soon as possible so if the file on the server isn't newer, you can disconnect immediately, whitout wasting bandwidth. Or even better, use the If-Modified-Since header.

-the best way for updating the servers would probably be to loop through the downloaded file, interpret each line and server -a it. This wouldn't replace any additions the user made to his/her server list, only update/add servers.


$input(Me like stars, You too?)
#7129 26/02/03 07:30 PM
Joined: Dec 2002
Posts: 5
J
Jah Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
J
Joined: Dec 2002
Posts: 5

Hopefully their servers.ini format, including the timestamp, is standard.

--Jah


Link Copied to Clipboard