From 541252724db32192e85571306ebc60949048a093 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Thu, 31 May 2012 21:22:21 -0400 Subject: [PATCH] Log account rather than ident upon exit. This fixes SourceForge bug #2992882. --- ChangeLog | 8 ++++++++ include/client.h | 2 ++ ircd/s_misc.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9d8aa47..aa32341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-05-07 Michael Poole + + * include/client.h (cli_account): New helper macro to return the + client's account name, or "0" for unstamped clients. + + * ircd/s_misc.c (exit_client): Use that when logging the client's + exit. + 2012-05-07 Michael Poole * ircd/gline.c (count_users): Use the client's real host, rather diff --git a/include/client.h b/include/client.h index 26f0481..d889fd3 100644 --- a/include/client.h +++ b/include/client.h @@ -317,6 +317,8 @@ struct Client { #define cli_username(cli) ((cli)->cli_username) /** Get client realname (information field). */ #define cli_info(cli) ((cli)->cli_info) +/** Get client account string. */ +#define cli_account(cli) (cli_user(cli) ? cli_user(cli)->account : "0") /** Get number of incoming bytes queued for client. */ #define cli_count(cli) con_count(cli_connect(cli)) diff --git a/ircd/s_misc.c b/ircd/s_misc.c index b5324fa..111e9c7 100644 --- a/ircd/s_misc.c +++ b/ircd/s_misc.c @@ -389,7 +389,7 @@ int exit_client(struct Client *cptr, cli_firsttime(victim), on_for, cli_user(victim)->username, cli_sockhost(victim), ircd_ntoa(&cli_ip(victim)), - IsAccount(victim) ? cli_username(victim) : "0", + cli_account(victim), NumNick(victim), /* two %s's */ cli_name(victim), cli_info(victim)); -- 2.20.1