summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-21 08:50:40 -0400
committerAdam <Adam@anope.org>2014-05-21 08:50:40 -0400
commitf627a3bacd0d058e94260dac1555790cafd9a926 (patch)
tree4ba71bf94b44ba07abc627ba0c26f3b8b94da439 /src/servers.cpp
parent5a1257b7f0b44ee3fd4639e5be288d160ceb5095 (diff)
Core prep for p10 stuff
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp49
1 files changed, 1 insertions, 48 deletions
diff --git a/src/servers.cpp b/src/servers.cpp
index e1b66baa8..3427c2beb 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -95,7 +95,7 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano
{
User *u = it->second;
- BotInfo *bi = BotInfo::Find(u->nick);
+ BotInfo *bi = BotInfo::Find(u->GetUID());
if (bi)
{
XLine x(bi->nick, "Reserved for services");
@@ -352,53 +352,6 @@ Server *Server::Find(const Anope::string &name, bool name_only)
return NULL;
}
-static inline char& nextID(char &c)
-{
- if (c == 'Z')
- c = '0';
- else if (c != '9')
- ++c;
- else
- c = 'A';
- return c;
-}
-
-const Anope::string Servers::TS6_UID_Retrieve()
-{
- if (!IRCD || !IRCD->RequiresID)
- return "";
-
- static Anope::string current_uid = "AAAAAA";
-
- do
- {
- int current_len = current_uid.length() - 1;
- while (current_len >= 0 && nextID(current_uid[current_len--]) == 'A');
- }
- while (User::Find(Me->GetSID() + current_uid) != NULL);
-
- return Me->GetSID() + current_uid;
-}
-
-const Anope::string Servers::TS6_SID_Retrieve()
-{
- if (!IRCD || !IRCD->RequiresID)
- return "";
-
- static Anope::string current_sid = Config->GetBlock("serverinfo")->Get<const Anope::string>("id");
- if (current_sid.empty())
- current_sid = "00A";
-
- do
- {
- int current_len = current_sid.length() - 1;
- while (current_len >= 0 && nextID(current_sid[current_len--]) == 'A');
- }
- while (Server::Find(current_sid) != NULL);
-
- return current_sid;
-}
-
Server* Servers::GetUplink()
{
for (unsigned i = 0; Me && i < Me->GetLinks().size(); ++i)