-
- return 0;
-}
-
-/*
- * valid_comment
- * inputs - pointer to client
- * - pointer to comment
- * output - 0 if no valid comment, 1 if valid
- * side effects - NONE
- */
-static int
-valid_comment(char *comment)
-{
- if(strchr(comment, '"'))
- return 0;
-
- if(strlen(comment) > BANREASONLEN)
- comment[BANREASONLEN] = '\0';
-
- return 1;
-}
-
-/*
- * flush_write()
- *
- * inputs - pointer to client structure of oper requesting unkline
- * - out is the file descriptor
- * - buf is the buffer to write
- * - ntowrite is the expected number of character to be written
- * - temppath is the temporary file name to be written
- * output - YES for error on write
- * - NO for success
- * side effects - if successful, the buf is written to output file
- * if a write failure happesn, and the file pointed to
- * by temppath, if its non NULL, is removed.
- *
- * The idea here is, to be as robust as possible when writing to the
- * kline file.
- *
- * -Dianora
- */
-static int
-flush_write(struct Client *source_p, FILE * out, char *buf, char *temppath)
-{
- int error_on_write = (fputs(buf, out) < 0) ? YES : NO;
-
- if(error_on_write)
- {
- sendto_one_notice(source_p, ":Unable to write to %s", temppath);
- fclose(out);
- if(temppath != NULL)
- (void) unlink(temppath);
- }
- return (error_on_write);