EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   ZSave fix (https://www.eqemulator.org/forums/showthread.php?t=7929)

Yodason 06-12-2003 03:44 AM

ZSave fix
 
in
Code:

bool Zone::SaveZoneCFG(const char* filename) {
change
Code:

        if ((zhdr_file = fopen(filename, "wb")) == 0) {

                cout << "Could not open " << fname << " for writing." << endl;

                return false;

        }

to
Code:

        if ((zhdr_file = fopen(fname, "wb")) == 0) {

                cout << "Could not open " << fname << " for writing." << endl;

                return false;

        }

and in client.cpp change the "zsave" else to
Code:

        else if(strcasecmp(sep->arg[0], "#zsave") == 0) {
                // modifys and resends zhdr packet
                if(sep->arg[1][0]==0)
                        Message(0, "Usage: #zsave <zone name>");
                else {
                        if(zone->SaveZoneCFG(sep->argplus[1]))
                                Message(13, "Zone header file %s saved successfully.", sep->argplus[1]);
                        else
                                Message(13, "ERROR: Zone header data was NOT saved. (%s)", sep->argplus[1]);
                }
        }

BTW - scruffy's code here.

gej302 06-12-2003 03:47 AM

NM - had a blonde moment...

Yodason 06-12-2003 03:48 AM

filename to fname

Trumpcard 06-12-2003 05:25 AM

Man Yoda, you guys are cranking em out !

Trumpcard 06-15-2003 03:00 PM

Merged this into cvs. Mind certifying it is implemented correctly?


Thanks.

fnemo 06-15-2003 07:27 PM

i'll check it out since yoda is away for a couple weeks.


All times are GMT -4. The time now is 02:30 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.