diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-12 22:51:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-12 22:51:38 +0000 |
commit | 3679c5ebb764521ec940a526af16f61985ae15da (patch) | |
tree | 7ba47a2ccce8ddca636d31c53e0d0a98ab29e182 /src/inspircd.cpp | |
parent | cc9854655d57d49aec35150799e125b0fbe23dce (diff) |
New clone counting mechanism (this isnt tested yet)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5967 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index e7801f1d5..8c297af07 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -841,6 +841,24 @@ int InspIRCd::SetTimeDelta(int delta) return old; } +void InspIRCd::AddLocalClone(userrec* user) +{ + clonemap::iterator x = local_clones.find(user->GetIPString()); + if (x != local_clones.end()) + x->second++; + else + local_clones[user->GetIPString()] = 1; +} + +void InspIRCd::AddGlobalClone(userrec* user) +{ + clonemap::iterator y = global_clones.find(user->GetIPString()); + if (y != global_clones.end()) + y->second++; + else + global_clones[user->GetIPString()] = 1; +} + int InspIRCd::GetTimeDelta() { return time_delta; |