]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Add UserManager::NextAlreadySentId() and convert all code to use it
[user/henk/code/inspircd.git] / src / users.cpp
index d760c713f30803be77e026a8aab06b0c56c8a861..2585443126c8f85a40cc5617d23679e2a3c72eb9 100644 (file)
@@ -139,28 +139,6 @@ const std::string& User::GetFullRealHost()
        return this->cached_fullrealhost;
 }
 
-InviteList& LocalUser::GetInviteList()
-{
-       RemoveExpiredInvites();
-       return invites;
-}
-
-bool LocalUser::RemoveInvite(Channel* chan)
-{
-       Invitation* inv = Invitation::Find(chan, this);
-       if (inv)
-       {
-               delete inv;
-               return true;
-       }
-       return false;
-}
-
-void LocalUser::RemoveExpiredInvites()
-{
-       Invitation::Find(NULL, this);
-}
-
 bool User::HasModePermission(unsigned char, ModeType)
 {
        return true;
@@ -328,7 +306,6 @@ CullResult User::cull()
 
 CullResult LocalUser::cull()
 {
-       ClearInvites();
        eh.cull();
        return User::cull();
 }
@@ -896,7 +873,7 @@ void User::ForEachNeighbor(ForEachNeighborHandler& handler, bool include_self)
        FOREACH_MOD(OnBuildNeighborList, (this, include_chans, exceptions));
 
        // Get next id, guaranteed to differ from the already_sent field of all users
-       const already_sent_t newid = ++LocalUser::already_sent_id;
+       const already_sent_t newid = ServerInstance->Users.NextAlreadySentId();
 
        // Handle exceptions first
        for (std::map<User*, bool>::const_iterator i = exceptions.begin(); i != exceptions.end(); ++i)