Instance->Logs->Log("USERS", DEBUG,"New user fd: %d", socket);
- int j = 0;
-
this->unregistered_count++;
(*(this->clientlist))[New->uuid] = New;
/* The users default nick is their UUID */
- New->nick.assign(New->uuid, 0, NICKMAX - 1);
+ New->nick.assign(New->uuid, 0, ServerInstance->Config->Limits.NickMax);
New->server = Instance->FindServerNamePtr(Instance->Config->ServerName);
New->ident.assign("unknown");
New->lastping = 1;
/* Smarter than your average bear^H^H^H^Hset of strlcpys. */
- for (const char* temp = New->GetIPString(); *temp && j < 64; temp++, j++)
- New->dhost[j] = New->host[j] = *temp;
- New->dhost[j] = New->host[j] = 0;
+ New->dhost.assign(New->GetIPString(), 0, 64);
+ New->host.assign(New->GetIPString(), 0, 64);
Instance->Users->AddLocalClone(New);
Instance->Users->AddGlobalClone(New);