Log in

View Full Version : ZSave fix


Yodason
06-12-2003, 03:44 AM
in bool Zone::SaveZoneCFG(const char* filename) {
change
if ((zhdr_file = fopen(filename, "wb")) == 0) {

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

return false;

}

to

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

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.