diff options
| author | 2021-05-09 22:45:40 +0100 | |
|---|---|---|
| committer | 2021-05-10 01:46:51 +0100 | |
| commit | ecabf153d01b4cb48944155a638e1cf4c1d80d98 (patch) | |
| tree | 8a1b2773847c0a9bf6ffefff2ae1b8ef4ff95df5 /include | |
| parent | Switch Channel::ChanModes to use the channel mode map. (diff) | |
Add a new map-based method for building link data.
The new link data is not currently used but will be in the near
future.
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index 78ac0e41d..a617c93e0 100644 --- a/include/modules.h +++ b/include/modules.h @@ -297,6 +297,12 @@ class CoreExport Module : public Cullable, public usecountbase void DetachEvent(Implementation i); public: + /** Data which is synchronised between servers on link. */ + typedef std::map<std::string, std::string, irc::insensitive_swo> LinkData; + + /** Data which is synchronised between servers on link. */ + typedef std::map<std::string, std::pair<std::optional<std::string>, std::optional<std::string>>, irc::insensitive_swo> LinkDataDiff; + /** A list of modules. */ typedef std::vector<Module*> List; @@ -329,10 +335,17 @@ class CoreExport Module : public Cullable, public usecountbase */ Cullable::Result Cull() override; + /** Compares our link data to that of another server. + * @param otherdata Link data from another server. + * @param diffs The difference between the two sets of link data. + */ + virtual void CompareLinkData(const LinkData& otherdata, LinkDataDiff& diffs); + /** Retrieves link compatibility data for this module. * @param data The location to store link compatibility data. + * @param compatdata The location to store link compatibility data for older protocols. */ - virtual void GetLinkData(std::string& data); + virtual void GetLinkData(LinkData& data, std::string& compatdata); /** Retrieves a string that represents the properties of this module. */ std::string GetPropertyString() const; |
