- 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);
-}
-
-/** Set cli_sockhost(cptr) from \a host.
- * If \a host contains an '@', copy starting after that byte.
- * Otherwise copy all of \a host.
- * @param cptr Client to operate on.
- * @param host hostname or user\@hostname string.
- */
-void get_sockhost(struct Client *cptr, char *host)
-{
- char *s;
- if ((s = strchr(host, '@')))
- s++;
- else
- s = host;
- ircd_strncpy(cli_sockhost(cptr), s, HOSTLEN);
+ 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;