From f5519a585fdff5a009c20c3d89db315d4af45196 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 17 Jan 2015 15:31:35 +0000 Subject: Fix modules not being versioned on Windows. --- include/modules.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index cd0d5aad0..9857012fc 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1717,7 +1717,8 @@ struct AllModuleList { break; \ } \ return TRUE; \ - } + } \ + extern "C" DllExport const char inspircd_src_version[] = VERSION " r" REVISION; #else -- cgit v1.3.1-10-gc9f91 From c38d29fd760a52958377a0664cbcdf74e9a12c84 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 26 Feb 2015 22:35:06 +0000 Subject: Fix various Doxygen warnings. --- .gitignore | 1 + README.md | 2 +- include/dns.h | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/.gitignore b/.gitignore index 0b02b1292..f39aa4a55 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ /BSDmakefile /GNUmakefile /build +/docs/doxygen /inspircd /org.inspircd.plist /run diff --git a/README.md b/README.md index 70171861c..f3b3c3c32 100644 --- a/README.md +++ b/README.md @@ -18,4 +18,4 @@ many different users. * [Website](http://inspircd.org) * [GitHub](https://github.com/inspircd) -* IRC: #inspircd on irc.inspircd.org \ No newline at end of file +* IRC: \#inspircd on irc.inspircd.org diff --git a/include/dns.h b/include/dns.h index 95abaaf80..de4bcf422 100644 --- a/include/dns.h +++ b/include/dns.h @@ -92,6 +92,7 @@ class CoreExport DNSResult * @param res The request result, a hostname or IP * @param timetolive The request time-to-live * @param orig The original request, a hostname or IP + * @param qt The type of DNS query this result represents. */ DNSResult(int i, const std::string &res, unsigned long timetolive, const std::string &orig, QueryType qt = DNS_QUERY_NONE) : id(i), result(res), ttl(timetolive), original(orig), type(qt) { } }; @@ -118,6 +119,7 @@ class CoreExport CachedQuery /** Build a cached query * @param res The result data, an IP or hostname + * @param qt The type of DNS query this instance represents. * @param ttl The time-to-live value of the query result */ CachedQuery(const std::string &res, QueryType qt, unsigned int ttl); -- cgit v1.3.1-10-gc9f91 From 7f051bcc5198c2eb3fff1ca52888bd7c6ec19000 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 3 Mar 2015 15:45:22 -0500 Subject: Rebuild clone counts on rehash --- include/usermanager.h | 4 ++++ src/configreader.cpp | 1 + src/usermanager.cpp | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) (limited to 'include') diff --git a/include/usermanager.h b/include/usermanager.h index ac8ae1cb3..2a9d6b47b 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -112,6 +112,10 @@ class CoreExport UserManager */ void RemoveCloneCounts(User *user); + /** Rebuild clone counts + */ + void RehashCloneCounts(); + /** Return the number of global clones of this user * @param user The user to get a count for * @return The global clone count of this user diff --git a/src/configreader.cpp b/src/configreader.cpp index b3caf8c75..bcee938d5 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -963,6 +963,7 @@ void ConfigReaderThread::Finish() * XXX: The order of these is IMPORTANT, do not reorder them without testing * thoroughly!!! */ + ServerInstance->Users->RehashCloneCounts(); ServerInstance->XLines->CheckELines(); ServerInstance->XLines->ApplyLines(); ServerInstance->Res->Rehash(); diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 1918b5c4c..76446c5b5 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -287,6 +287,22 @@ void UserManager::RemoveCloneCounts(User *user) } } +void UserManager::RehashCloneCounts() +{ + local_clones.clear(); + global_clones.clear(); + + const user_hash& hash = *ServerInstance->Users->clientlist; + for (user_hash::const_iterator i = hash.begin(); i != hash.end(); ++i) + { + User* u = i->second; + + if (IS_LOCAL(u)) + AddLocalClone(u); + AddGlobalClone(u); + } +} + unsigned long UserManager::GlobalCloneCount(User *user) { clonemap::iterator x = global_clones.find(user->GetCIDRMask()); -- cgit v1.3.1-10-gc9f91