Write error messages for rename. Also tweak some error outputs, and fix -i.

This commit is contained in:
Nicholas Marriott
2007-09-29 13:22:15 +00:00
parent a6875d0dae
commit 653ee721df
6 changed files with 68 additions and 29 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server-fn.c,v 1.7 2007-09-29 09:53:25 nicm Exp $ */
/* $Id: server-fn.c,v 1.8 2007-09-29 13:22:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@ -172,6 +172,20 @@ server_draw_client(struct client *c, u_int py_upper, u_int py_lower)
buffer_reverse_add(c->out, sizeof hdr);
}
/* Send error message command to client. */
void
server_write_error(struct client *c, const char *fmt, ...)
{
va_list ap;
char *msg;
va_start(ap, fmt);
xvasprintf(&msg, fmt, ap);
va_end(ap);
server_write_client(c, MSG_ERROR, msg, strlen(msg));
xfree(msg);
}
/* Write message command to a client. */
void