+void
+filter_client_quit(void *data_)
+{
+ hook_data_client_quit *data = data_;
+ struct Client *s = data->client;
+ if (IsOper(s)) {
+ return;
+ }
+ char *text = strcpy(clean_buffer, data->orig_reason);
+ strip_colour(text);
+ strip_unprintable(text);
+ unsigned r = match_message("0", s, "QUIT", NULL, data->orig_reason) |
+ match_message("1", s, "QUIT", NULL, text);
+ if (r & ACT_DROP) {
+ data->reason = NULL;
+ }
+ if (r & ACT_ALARM) {
+ sendto_realops_snomask(SNO_GENERAL, L_ALL | L_NETWIDE,
+ "FILTER: %s!%s@%s [%s]",
+ s->name, s->username, s->host, s->sockhost);
+ }
+ /* No point in doing anything with ACT_KILL */
+}
+