diff options
-rw-r--r-- | docs/conf/helpop-full.conf.example | 6 | ||||
-rw-r--r-- | docs/conf/helpop.conf.example | 6 | ||||
-rw-r--r-- | docs/conf/modules.conf.example | 3 | ||||
-rw-r--r-- | include/usermanager.h | 4 | ||||
-rw-r--r-- | make/template/main.mk | 1 | ||||
-rw-r--r-- | src/configreader.cpp | 1 | ||||
-rw-r--r-- | src/usermanager.cpp | 16 |
7 files changed, 27 insertions, 10 deletions
diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example index f86eb2394..a3529b9dc 100644 --- a/docs/conf/helpop-full.conf.example +++ b/docs/conf/helpop-full.conf.example @@ -1058,8 +1058,6 @@ Acting extbans: matching users (requires blockcaps module). C:<banmask> Blocks CTCPs from matching users (requires noctcp module). - M:<account> Blocks messages from users logged into a matching - account (requires services account module). N:<banmask> Blocks nick changes from matching users (requires nonicks module). Q:<banmask> Blocks kicks by matching users (requires nokicks @@ -1072,8 +1070,8 @@ Acting extbans: (requires services account). A ban given to an Acting extban may either be a nick!user@host mask -(unless stated otherwise, for example M: taking an account name), -matched against users as for a normal ban, or a Matching extban. +(unless stated otherwise), matched against users as for a normal ban, +or a Matching extban. There is an additional special type of extended ban, a redirect ban: diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example index 5b92faeda..32884ea16 100644 --- a/docs/conf/helpop.conf.example +++ b/docs/conf/helpop.conf.example @@ -300,8 +300,6 @@ Acting extbans: matching users (requires blockcaps module). C:<banmask> Blocks CTCPs from matching users (requires noctcp module). - M:<account> Blocks messages from users logged into a matching - account (requires services account module). N:<banmask> Blocks nick changes from matching users (requires nonicks module). Q:<banmask> Blocks kicks by matching users (requires nokicks @@ -314,8 +312,8 @@ Acting extbans: (requires services account). A ban given to an Acting extban may either be a nick!user@host mask -(unless stated otherwise, for example M: taking an account name), -matched against users as for a normal ban, or a Matching extban. +(unless stated otherwise), matched against users as for a normal ban, +or a Matching extban. There is an additional special type of extended ban, a redirect ban: diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 70025260d..71a0fb079 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -1613,9 +1613,8 @@ # as identified separately from the idea of a master account, which # can be useful for services which are heavily nick-as-account centric. # -# Also of note is that this module implements three extbans: +# Also of note is that this module implements two extbans: # +b R: (stop matching account names from joining) -# +b M: (stop matching account names from speaking) # +b U:n!u@h (blocks matching unregistered users) # #<module name="m_services_account.so"> 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/make/template/main.mk b/make/template/main.mk index f88a80e3a..d5705d928 100644 --- a/make/template/main.mk +++ b/make/template/main.mk @@ -125,6 +125,7 @@ CXXFLAGS += -Iinclude @BSD_ONLY MAKE += -s RUNCC = perl $(SOURCEPATH)/make/run-cc.pl $(CC) RUNLD = perl $(SOURCEPATH)/make/run-cc.pl $(CC) + VERBOSE = @ENDIF @IFDEF PURE_STATIC 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()); |