Add a sendq_cleared hook
This commit is contained in:
parent
b6058dee01
commit
9f25def02a
3 changed files with 8 additions and 0 deletions
|
@ -46,6 +46,7 @@ extern int h_conf_read_end;
|
|||
extern int h_outbound_msgbuf;
|
||||
extern int h_rehash;
|
||||
extern int h_cap_change;
|
||||
extern int h_sendq_cleared;
|
||||
|
||||
void init_hook(void);
|
||||
int register_hook(const char *name);
|
||||
|
|
|
@ -72,6 +72,7 @@ int h_conf_read_end;
|
|||
int h_outbound_msgbuf;
|
||||
int h_rehash;
|
||||
int h_cap_change;
|
||||
int h_sendq_cleared;
|
||||
|
||||
void
|
||||
init_hook(void)
|
||||
|
@ -97,6 +98,7 @@ init_hook(void)
|
|||
h_outbound_msgbuf = register_hook("outbound_msgbuf");
|
||||
h_rehash = register_hook("rehash");
|
||||
h_cap_change = register_hook("cap_change");
|
||||
h_sendq_cleared = register_hook("sendq_cleared");
|
||||
}
|
||||
|
||||
/* grow_hooktable()
|
||||
|
|
|
@ -182,7 +182,12 @@ send_queued(struct Client *to)
|
|||
send_queued_write, to);
|
||||
}
|
||||
else
|
||||
{
|
||||
hook_data_client hdata;
|
||||
hdata.client = to;
|
||||
ClearFlush(to);
|
||||
call_hook(h_sendq_cleared, &hdata);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue