void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
LocalUser* const New = new LocalUser(socket, client, server);
UserIOHandler* eh = &New->eh;
ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New user fd: %d", socket);
this->unregistered_count++;
LocalUser* const New = new LocalUser(socket, client, server);
UserIOHandler* eh = &New->eh;
ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New user fd: %d", socket);
this->unregistered_count++;
this->local_users.push_front(New);
if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
this->local_users.push_front(New);
if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE))
- /*
- * First class check. We do this again in FullConnect after DNS is done, and NICK/USER is recieved.
- * See my note down there for why this is required. DO NOT REMOVE. :) -- w00t
- */
+ // First class check. We do this again in LocalUser::FullConnect() after DNS is done, and NICK/USER is received.
- * It is intended to do background checking on all the user structs, e.g.
- * stuff like ping checks, registration timeouts, etc.
+ * It is intended to do background checking on all the users, e.g. do
+ * ping checks, registration timeouts, etc.
for (LocalList::iterator i = local_users.begin(); i != local_users.end(); )
{
// It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list
for (LocalList::iterator i = local_users.begin(); i != local_users.end(); )
{
// It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list