diff options
author | Adam <Adam@anope.org> | 2014-06-23 09:45:15 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-06-23 09:45:15 -0400 |
commit | fd9bb0ea7e3c8a39f1632c2ebbdc25d0fac192a0 (patch) | |
tree | 1d68e86065e0b012aee41533d4f9b289ee0707ac /src/servers.cpp | |
parent | 148b26f687ce85dc01e852a2358b03d493757ada (diff) | |
parent | 9a947fa4359c667be58ebae4634d9ac0e53d5db4 (diff) |
Merge branch '2.0' into 2.1
Conflicts:
cmake/Anope.cmake
cmake/FindGettext.cmake
include/access.h
include/messages.h
include/modes.h
include/modules.h
include/users.h
modules/CMakeLists.txt
modules/commands/bs_bot.cpp
modules/commands/cs_access.cpp
modules/commands/cs_ban.cpp
modules/commands/cs_clone.cpp
modules/commands/cs_flags.cpp
modules/commands/cs_info.cpp
modules/commands/cs_list.cpp
modules/commands/cs_log.cpp
modules/commands/cs_mode.cpp
modules/commands/cs_status.cpp
modules/commands/cs_suspend.cpp
modules/commands/cs_updown.cpp
modules/commands/cs_xop.cpp
modules/commands/ms_check.cpp
modules/commands/ns_access.cpp
modules/commands/ns_cert.cpp
modules/commands/ns_group.cpp
modules/commands/ns_register.cpp
modules/commands/ns_set.cpp
modules/commands/ns_suspend.cpp
modules/commands/os_session.cpp
modules/commands/os_svs.cpp
modules/extra/m_ldap_authentication.cpp
modules/extra/m_regex_pcre.cpp
modules/extra/m_sql_authentication.cpp
modules/extra/stats/m_chanstats.cpp
modules/protocol/bahamut.cpp
modules/protocol/hybrid.cpp
modules/protocol/inspircd12.cpp
modules/protocol/inspircd20.cpp
modules/protocol/unreal.cpp
modules/pseudoclients/chanserv.cpp
modules/pseudoclients/chanserv/channel.cpp
modules/pseudoclients/nickserv/nickserv.cpp
modules/webcpanel/pages/chanserv/access.cpp
src/access.cpp
src/bots.cpp
src/channels.cpp
src/language.cpp
src/modes.cpp
src/modulemanager.cpp
src/process.cpp
src/users.cpp
src/version.sh
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index c4cb3665e..a6998b200 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -96,7 +96,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"); @@ -353,53 +353,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("options")->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) |