X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusermanager.h;h=941569e8c02e7af1813ec95468fd7e924a3d36d8;hb=c528328748444fa0f0cff1a0377a7a6b9e557905;hp=a67f90224d628839eda4c05a6f7feac53e08cd11;hpb=6fe1f4e1136f2ab95a88e68af1894bf6002d03f4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/usermanager.h b/include/usermanager.h index a67f90224..941569e8c 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -56,6 +56,11 @@ class CoreExport UserManager : public fakederef */ LocalList local_users; + /** Last used already sent id, used when sending messages to neighbors to help determine whether the message has + * been sent to a particular user or not. See User::ForEachNeighbor() for more info. + */ + already_sent_t already_sent_id; + public: /** Constructor, initializes variables */ @@ -83,12 +88,6 @@ class CoreExport UserManager : public fakederef */ unsigned int unregistered_count; - /** - * Reset the already_sent IDs so we don't wrap it around and drop a message - * Also removes all expired invites - */ - void GarbageCollect(); - /** Perform background user events such as PING checks */ void DoBackgroundUserStuff(); @@ -187,4 +186,9 @@ class CoreExport UserManager : public fakederef * @param ... The format arguments */ void ServerNoticeAll(const char* text, ...) CUSTOM_PRINTF(2, 3); + + /** Retrieves the next already sent id, guaranteed to be not equal to any user's already_sent field + * @return Next already_sent id + */ + already_sent_t NextAlreadySentId(); };