1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 /* $Core: libIRCDusermanager */
18 void UserManager::AddLocalClone(User *user)
20 clonemap::iterator x = local_clones.find(user->GetIPString());
21 if (x != local_clones.end())
24 local_clones[user->GetIPString()] = 1;
27 void UserManager::AddGlobalClone(User *user)
29 clonemap::iterator y = global_clones.find(user->GetIPString());
30 if (y != global_clones.end())
33 global_clones[user->GetIPString()] = 1;
36 void UserManager::RemoveCloneCounts(User *user)
38 clonemap::iterator x = local_clones.find(user->GetIPString());
39 if (x != local_clones.end())
44 local_clones.erase(x);
48 clonemap::iterator y = global_clones.find(user->GetIPString());
49 if (y != global_clones.end())
54 global_clones.erase(y);
59 unsigned long UserManager::GlobalCloneCount(User *user)
61 clonemap::iterator x = global_clones.find(user->GetIPString());
62 if (x != global_clones.end())
68 unsigned long UserManager::LocalCloneCount(User *user)
70 clonemap::iterator x = local_clones.find(user->GetIPString());
71 if (x != local_clones.end())