/* NOTE: Calling this one parameter constructor for User automatically
* allocates a new UUID and places it in the hash_map.
*/
- LocalUser* New = NULL;
- try
- {
- New = new LocalUser(socket, client, server);
- }
- catch (...)
- {
- ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
- ServerInstance->SNO->WriteToSnoMask('a', "WARNING *** Duplicate UUID allocated!");
- return;
- }
+ LocalUser* const New = new LocalUser(socket, client, server);
UserIOHandler* eh = &New->eh;
// If this listener has an IO hook provider set then tell it about the connection
// Reset the already_sent IDs so we don't wrap it around and drop a message
LocalUser::already_sent_id = 0;
for (LocalList::const_iterator i = local_users.begin(); i != local_users.end(); ++i)
- {
(**i).already_sent = 0;
- (**i).RemoveExpiredInvites();
- }
}
/* this returns true when all modules are satisfied that the user should be allowed onto the irc server
/*
* loop over all local users..
*/
- for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i)
+ 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
LocalUser* curr = *i;
+ ++i;
if (curr->CommandFloodPenalty || curr->eh.getSendQSize())
{