Use timeout events for the identify and message timers.

This commit is contained in:
Nicholas Marriott
2009-11-04 23:29:42 +00:00
parent b3c4956efe
commit b1264a7416
4 changed files with 32 additions and 16 deletions

View File

@ -120,8 +120,11 @@ server_client_lost(struct client *c)
if (c->title != NULL)
xfree(c->title);
evtimer_del(&c->identify_timer);
if (c->message_string != NULL)
xfree(c->message_string);
evtimer_del(&c->message_timer);
if (c->prompt_string != NULL)
xfree(c->prompt_string);
@ -448,12 +451,6 @@ server_client_check_timers(struct client *c)
if (gettimeofday(&tv, NULL) != 0)
fatal("gettimeofday failed");
if (c->flags & CLIENT_IDENTIFY && timercmp(&tv, &c->identify_timer, >))
server_clear_identify(c);
if (c->message_string != NULL && timercmp(&tv, &c->message_timer, >))
status_message_clear(c);
if (c->message_string != NULL || c->prompt_string != NULL) {
/*
* Don't need timed redraw for messages/prompts so bail now.