-
- fclose(in);
- if (fclose(out))
- error_on_write = YES;
-
- if(error_on_write)
- {
- sendto_one_notice(source_p, ":Couldn't write temp resv file, aborted");
- return 0;
- }
- else if(!found_resv)
- {
- sendto_one_notice(source_p, ":Cannot find RESV for %s in file", name);
-
- if(temppath != NULL)
- (void) unlink(temppath);
-
- return 0;
- }
-
- if (rename(temppath, filename))
- {
- sendto_one_notice(source_p, ":Couldn't rename temp file, aborted");
- return 0;
- }
-
- sendto_one_notice(source_p, ":RESV for [%s] is removed", name);
- sendto_realops_snomask(SNO_GENERAL, L_ALL,
- "%s has removed the RESV for: [%s]", get_oper_name(source_p), name);
- ilog(L_KLINE, "UR %s %s", get_oper_name(source_p), name);
-
- return 1;