]> jfr.im git - irc/quakenet/snircd.git/commitdiff
In register user, for local clients, we need to set up realusername in case someone...
authorpaul <redacted>
Sat, 15 Jul 2006 10:41:00 +0000 (11:41 +0100)
committerpaul <redacted>
Sat, 15 Jul 2006 10:41:00 +0000 (11:41 +0100)
For remote client, we need to set username to cli_username(sptr).

ircd/s_user.c

index 476bb1346dd1430994f170c0efaa1816c1cdfb80..fd0d65e986ea4c6cf37a30db3e852c11f3dc3316 100644 (file)
@@ -355,6 +355,9 @@ int register_user(struct Client *cptr, struct Client *sptr)
   {
     assert(cptr == sptr);
 
+  /* Have to set up "realusername" */
+  ircd_strncpy(user->realusername, user->username, USERLEN);
+
     Count_unknownbecomesclient(sptr, UserStats);
 
     if (MyConnect(sptr) && feature_bool(FEAT_AUTOINVISIBLE))
@@ -429,6 +432,7 @@ int register_user(struct Client *cptr, struct Client *sptr)
   else {
     struct Client *acptr = user->server;
 
+    ircd_strncpy(user->username, cli_username(sptr), USERLEN);
     Count_newremoteclient(UserStats, acptr);
 
     if (cli_from(acptr) != cli_from(sptr))