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.
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.