Show the services login name in WHOWAS.
The numeric is the same (330) as used in WHOIS. This takes at most half a megabyte of memory (large network, 30 char nicks).
This commit is contained in:
parent
5b383ce060
commit
01b7a527a3
3 changed files with 7 additions and 1 deletions
|
@ -53,8 +53,9 @@ struct Whowas
|
||||||
char username[USERLEN + 1];
|
char username[USERLEN + 1];
|
||||||
char hostname[HOSTLEN + 1];
|
char hostname[HOSTLEN + 1];
|
||||||
char sockhost[HOSTIPLEN + 1];
|
char sockhost[HOSTIPLEN + 1];
|
||||||
const char *servername;
|
|
||||||
char realname[REALLEN + 1];
|
char realname[REALLEN + 1];
|
||||||
|
char suser[NICKLEN + 1];
|
||||||
|
const char *servername;
|
||||||
time_t logoff;
|
time_t logoff;
|
||||||
struct Client *online; /* Pointer to new nickname for chasing or NULL */
|
struct Client *online; /* Pointer to new nickname for chasing or NULL */
|
||||||
struct Whowas *next; /* for hash table... */
|
struct Whowas *next; /* for hash table... */
|
||||||
|
|
|
@ -115,6 +115,10 @@ m_whowas(struct Client *client_p, struct Client *source_p, int parc, const char
|
||||||
form_str(RPL_WHOISACTUALLY),
|
form_str(RPL_WHOISACTUALLY),
|
||||||
temp->name, temp->sockhost);
|
temp->name, temp->sockhost);
|
||||||
#endif
|
#endif
|
||||||
|
if (!EmptyString(temp->suser))
|
||||||
|
sendto_one_numeric(source_p, RPL_WHOISLOGGEDIN,
|
||||||
|
"%s %s :was logged in as",
|
||||||
|
temp->name, temp->suser);
|
||||||
sendto_one_numeric(source_p, RPL_WHOISSERVER,
|
sendto_one_numeric(source_p, RPL_WHOISSERVER,
|
||||||
form_str(RPL_WHOISSERVER),
|
form_str(RPL_WHOISSERVER),
|
||||||
temp->name, temp->servername,
|
temp->name, temp->servername,
|
||||||
|
|
|
@ -81,6 +81,7 @@ void add_history(struct Client *client_p, int online)
|
||||||
strcpy(who->username, client_p->username);
|
strcpy(who->username, client_p->username);
|
||||||
strcpy(who->hostname, client_p->host);
|
strcpy(who->hostname, client_p->host);
|
||||||
strcpy(who->realname, client_p->info);
|
strcpy(who->realname, client_p->info);
|
||||||
|
strcpy(who->suser, client_p->user->suser);
|
||||||
if (!EmptyString(client_p->sockhost) && strcmp(client_p->sockhost, "0") && show_ip(NULL, client_p))
|
if (!EmptyString(client_p->sockhost) && strcmp(client_p->sockhost, "0") && show_ip(NULL, client_p))
|
||||||
strcpy(who->sockhost, client_p->sockhost);
|
strcpy(who->sockhost, client_p->sockhost);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue