1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 09:03:13 +02:00

Rename sptr->username to sptr->ident, since that is what it is.

[skip ci]
This commit is contained in:
Bram Matthys
2019-09-11 14:31:14 +02:00
parent c69bdbe175
commit d80e601760
8 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -929,7 +929,7 @@ struct Client {
It is never NULL */
unsigned char hopcount; /**< Number of servers to this, 0 means local client */
char name[HOSTLEN + 1]; /**< Unique name of the client: nickname for persons, hostname for servers */
char username[USERLEN + 1]; /**< Username, or actually the ident */
char ident[USERLEN + 1]; /**< Ident of the user, if available. Otherwise set to "unknown". */
char info[REALLEN + 1]; /**< Additional client information text. For persons this is gecos/realname */
char id[IDLEN + 1]; /**< Unique ID: SID or UID */
Client *srvptr; /**< Server on where this client is connected to (can be &me) */
+1 -1
View File
@@ -1700,7 +1700,7 @@ static void read_authports(int fd, int revents, void *userdata)
return;
}
ircstp->is_asuc++;
strlcpy(cptr->username, ruser, USERLEN + 1);
strlcpy(cptr->ident, ruser, USERLEN + 1);
cptr->flags |= FLAGS_GOTID;
Debug((DEBUG_INFO, "got username [%s]", ruser));
return;
+1 -1
View File
@@ -111,7 +111,7 @@ Client *make_client(Client *from, Client *servr)
INIT_LIST_HEAD(&cptr->client_hash);
INIT_LIST_HEAD(&cptr->id_hash);
(void)strcpy(cptr->username, "unknown");
(void)strcpy(cptr->ident, "unknown");
if (!from)
{
/* Local client */
+2 -2
View File
@@ -284,7 +284,7 @@ char *get_client_name(Client *sptr, int showip)
(void)ircsnprintf(nbuf, sizeof(nbuf), "%s[%s@%s.%u]",
sptr->name,
(!(sptr->flags & FLAGS_GOTID)) ? "" :
sptr->username,
sptr->ident,
sptr->ip ? sptr->ip : "???",
(unsigned int)sptr->local->port);
else
@@ -310,7 +310,7 @@ char *get_client_host(Client *cptr)
return get_client_name(cptr, FALSE);
(void)ircsnprintf(nbuf, sizeof(nbuf), "%s[%-.*s@%-.*s]",
cptr->name, USERLEN,
(!(cptr->flags & FLAGS_GOTID)) ? "" : cptr->username,
(!(cptr->flags & FLAGS_GOTID)) ? "" : cptr->ident,
HOSTLEN, cptr->local->hostp->h_name);
return nbuf;
}
+7 -7
View File
@@ -312,7 +312,7 @@ CMD_FUNC(m_uid)
me.name, sptr->name, me.name,
get_client_name(cptr, FALSE),
sptr->name,
sptr->user ? sptr->username : "",
sptr->user ? sptr->ident : "",
sptr->user ? sptr->user->server :
cptr->name);
sptr->flags |= FLAGS_KILLED;
@@ -645,7 +645,7 @@ CMD_FUNC(m_nick)
me.name, sptr->name, me.name,
get_client_name(cptr, FALSE),
sptr->name,
sptr->user ? sptr->username : "",
sptr->user ? sptr->ident : "",
sptr->user ? sptr->user->server :
cptr->name);
sptr->flags |= FLAGS_KILLED;
@@ -1259,7 +1259,7 @@ int _register_user(Client *cptr, Client *sptr, char *nick, char *username, char
* username. -Donwulff
*
* I do, We only allow a-z A-Z 0-9 _ - and . now so the
* !strchr(sptr->username, '@') check is out of date. -Cabal95
* !strchr(sptr->ident, '@') check is out of date. -Cabal95
*
* Moved the noident stuff here. -OnyxDragon
*/
@@ -1270,7 +1270,7 @@ int _register_user(Client *cptr, Client *sptr, char *nick, char *username, char
if (!(sptr->flags & FLAGS_DOID))
strlcpy(user->username, temp, USERLEN + 1);
else if (sptr->flags & FLAGS_GOTID)
strlcpy(user->username, sptr->username, USERLEN+1);
strlcpy(user->username, sptr->ident, USERLEN+1);
else
{
if (IDENT_CHECK == 0) {
@@ -1724,7 +1724,7 @@ int AllowClient(Client *cptr, struct hostent *hp, char *sockhost, char *username
if (aconf->flags.noident)
strlcpy(uhost, username, sizeof(uhost));
else
strlcpy(uhost, cptr->username, sizeof(uhost));
strlcpy(uhost, cptr->ident, sizeof(uhost));
strlcat(uhost, "@", sizeof(uhost));
}
else
@@ -1739,7 +1739,7 @@ int AllowClient(Client *cptr, struct hostent *hp, char *sockhost, char *username
if (aconf->flags.noident)
strlcpy(uhost, username, sizeof(uhost));
else
strlcpy(uhost, cptr->username, sizeof(uhost));
strlcpy(uhost, cptr->ident, sizeof(uhost));
(void)strlcat(uhost, "@", sizeof(uhost));
}
else
@@ -1758,7 +1758,7 @@ int AllowClient(Client *cptr, struct hostent *hp, char *sockhost, char *username
if (aconf->flags.noident)
strlcpy(uhost, username, sizeof(uhost));
else
strlcpy(uhost, cptr->username, sizeof(uhost));
strlcpy(uhost, cptr->ident, sizeof(uhost));
strlcat(uhost, "@localhost", sizeof(uhost));
}
else
+2 -2
View File
@@ -275,7 +275,7 @@ int _verify_link(Client *cptr, Client *sptr, char *servername, ConfigItem_link *
sendto_one(cptr, NULL, "ERROR :%s", xerrmsg);
sendto_ops_and_log("Outgoing link aborted to %s(%s@%s) (%s) %s",
cptr->serv->conf->servername, cptr->username, cptr->local->sockhost, xerrmsg, inpath);
cptr->serv->conf->servername, cptr->ident, cptr->local->sockhost, xerrmsg, inpath);
return exit_client(cptr, sptr, &me, NULL, xerrmsg);
}
link = cptr->serv->conf;
@@ -311,7 +311,7 @@ errlink:
servername, GetIP(cptr), inpath);
/* And send the "verbose" error msg only to locally connected ircops */
sendto_ops_and_log("Link denied for %s(%s@%s) (%s) %s",
servername, cptr->username, cptr->local->sockhost, xerrmsg, inpath);
servername, cptr->ident, cptr->local->sockhost, xerrmsg, inpath);
return exit_client(cptr, sptr, &me, NULL,
"Link denied (No link block found with your server name or link::incoming::mask did not match)");
}
+1 -1
View File
@@ -4542,7 +4542,7 @@ int _match_user(char *rmask, Client *acptr, int options)
p = strchr(p ? p : mask, '@');
if (p)
{
char *client_username = (acptr->user && *acptr->user->username) ? acptr->user->username : acptr->username;
char *client_username = (acptr->user && *acptr->user->username) ? acptr->user->username : acptr->ident;
*p++ = '\0';
if (!*p || !*mask)
+1 -1
View File
@@ -147,7 +147,7 @@ CMD_FUNC(m_whois)
if ((acptr == sptr) || IsOper(sptr))
{
sendnumeric(sptr, RPL_WHOISHOST, acptr->name,
(MyConnect(acptr) && strcmp(acptr->username, "unknown")) ? acptr->username : "*",
(MyConnect(acptr) && strcmp(acptr->ident, "unknown")) ? acptr->ident : "*",
acptr->user->realhost, acptr->ip ? acptr->ip : "");
}