When IAuth provides creation timestamp, exclude it from the name.
[ircu2.10.12-pk.git] / ircd / s_auth.c
index 02a91497e6cd89111924a404c379e3fa6e473f02..2a00dd1a781c46a4e180fd54da9de05de54266ed 100644 (file)
@@ -1953,8 +1953,10 @@ static int iauth_cmd_done_account(struct IAuth *iauth, struct Client *cli,
   }
   /* If account has a creation timestamp, use it. */
   assert(cli_user(cli) != NULL);
-  if (params[0][len] == ':')
+  if (params[0][len] == ':') {
     cli_user(cli)->acc_create = strtoul(params[0] + len + 1, NULL, 10);
+    params[0][len] = '\0';
+  }
 
   /* Copy account name to User structure. */
   ircd_strncpy(cli_user(cli)->account, params[0], ACCOUNTLEN);
@@ -2026,7 +2028,7 @@ static int iauth_cmd_challenge(struct IAuth *iauth, struct Client *cli,
 static int iauth_cmd_xquery(struct IAuth *iauth, struct Client *cli,
                            int parc, char **params)
 {
-  const char *serv;
+  char *serv;
   const char *routing;
   const char *query;
   struct Client *acptr;