+2005-03-30 Michael Poole <mdpoole@troilus.org>
+
+ * include/client.h (struct Client): Explain where cli_username
+ comes from.
+
+ * include/struct.h (struct User): Explain where this username
+ comes from, too
+
+ * ircd/ircd_res.c (timeout_resolver): Update parameter name in
+ Doxygen comment, too.
+
+ * ircd/s_misc.c (get_client_name): Reorganize to have less
+ indentation and behave like 2.10.11 when client is not idented.
+
2005-03-29 Michael Poole <mdpoole@troilus.org>
* doc/example.conf: Remove no-longer-used HIS_STATS_h.
struct irc_in_addr cli_ip; /**< Real IP of client */
short cli_status; /**< Client type */
char cli_name[HOSTLEN + 1]; /**< Unique name of the client, nick or host */
- char cli_username[USERLEN + 1]; /**< username here now for auth stuff */
+ char cli_username[USERLEN + 1]; /**< Username determined by ident lookup */
char cli_info[REALLEN + 1]; /**< Free form additional client information */
};
unsigned int refcnt; /**< Number of times this block is referenced */
unsigned int joined; /**< number of channels joined */
unsigned int invites; /**< Number of channels we've been invited to */
- char username[USERLEN + 1]; /**< remote account name */
+ /** Remote account name. Before registration is complete, this is
+ * either empty or contains the username from the USER command.
+ * After registration, that may be prefixed with ~ or it may be
+ * overwritten with the ident response.
+ */
+ char username[USERLEN + 1];
char host[HOSTLEN + 1]; /**< displayed hostname */
char realhost[HOSTLEN + 1]; /**< actual hostname */
char account[ACCOUNTLEN + 1]; /**< IRC account name */
}
/** Drop pending DNS lookups which have timed out.
- * @param[in] notused Timer event data (ignored).
+ * @param[in] ev Timer event data (ignored).
*/
static void
timeout_resolver(struct Event *ev)
{
static char nbuf[HOSTLEN * 2 + USERLEN + 5];
- if (MyConnect(sptr)) {
- if (showip)
- ircd_snprintf(0, nbuf, sizeof(nbuf), "%s[%s@%s]", cli_name(sptr),
- IsIdented(sptr) ? cli_username(sptr) : "unknown",
- cli_sock_ip(sptr));
- else
- return cli_name(sptr);
- return nbuf;
- }
- return cli_name(sptr);
+ if (!MyConnect(sptr) || !showip)
+ return cli_name(sptr);
+ ircd_snprintf(0, nbuf, sizeof(nbuf), "%s[%s@%s]", cli_name(sptr),
+ IsIdented(sptr) ? cli_username(sptr) : "",
+ cli_sock_ip(sptr));
+ return nbuf;
}
/** Set cli_sockhost(cptr) from \a host.