version 1.240, 2023/08/15 07:01:47 |
version 1.241, 2023/11/14 15:59:49 |
|
|
status_message_set(struct client *c, int delay, int ignore_styles, |
status_message_set(struct client *c, int delay, int ignore_styles, |
int ignore_keys, const char *fmt, ...) |
int ignore_keys, const char *fmt, ...) |
{ |
{ |
struct timeval tv; |
struct timeval tv; |
va_list ap; |
va_list ap; |
|
char *s; |
|
|
status_message_clear(c); |
|
status_push_screen(c); |
|
|
|
va_start(ap, fmt); |
va_start(ap, fmt); |
xvasprintf(&c->message_string, fmt, ap); |
xvasprintf(&s, fmt, ap); |
va_end(ap); |
va_end(ap); |
|
|
server_add_message("%s message: %s", c->name, c->message_string); |
log_debug("%s: %s", __func__, s); |
|
|
|
if (c == NULL) { |
|
server_add_message("message: %s", s); |
|
free(s); |
|
return; |
|
} |
|
|
|
status_message_clear(c); |
|
status_push_screen(c); |
|
c->message_string = s; |
|
server_add_message("%s message: %s", c->name, s); |
|
|
/* |
/* |
* With delay -1, the display-time option is used; zero means wait for |
* With delay -1, the display-time option is used; zero means wait for |