num_lost_servers++;
num_lost_users += QuitUsers(reason);
+ RemoveHash();
}
int TreeServer::QuitUsers(const std::string &reason)
/* We'd better tidy up after ourselves, eh? */
if (!IsRoot())
delete ServerUser;
+}
+void TreeServer::RemoveHash()
+{
Utils->sidlist.erase(sid);
Utils->serverlist.erase(GetName());
}
*/
void SQuitInternal(const std::string& reason, int& num_lost_servers, int& num_lost_users);
+ /** Remove the reference to this server from the hash maps
+ */
+ void RemoveHash();
+
public:
typedef std::vector<TreeServer*> ChildServers;
FakeUser* const ServerUser; /* User representing this server */
CullResult cull();
- /** Destructor
- * Removes the reference to this object from the
- * hash maps.
+ /** Destructor, deletes ServerUser unless IsRoot()
*/
~TreeServer();