1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 21:03:15 +02:00

Core prep for p10 stuff

This commit is contained in:
Adam
2014-05-21 08:50:40 -04:00
parent 5a1257b7f0
commit f627a3bacd
27 changed files with 166 additions and 138 deletions
+9 -8
View File
@@ -118,7 +118,7 @@ User* User::OnIntroduce(const Anope::string &snick, const Anope::string &sident,
// How IRCds handle collisions varies a lot, for safety well just always kill both sides
// With properly set qlines, this can almost never happen anyway
User *u = User::Find(snick);
User *u = User::Find(snick, true);
if (u)
{
Collide(u, !suid.empty() ? suid : snick, "Nick collision");
@@ -814,18 +814,19 @@ bool User::BadPassword()
User* User::Find(const Anope::string &name, bool nick_only)
{
if (!nick_only && isdigit(name[0]) && IRCD->RequiresID)
if (!nick_only && IRCD->RequiresID)
{
user_map::iterator it = UserListByUID.find(name);
if (it != UserListByUID.end())
return it->second;
if (IRCD->AmbiguousID)
return NULL;
}
else
{
user_map::iterator it = UserListByNick.find(name);
if (it != UserListByNick.end())
return it->second;
}
user_map::iterator it = UserListByNick.find(name);
if (it != UserListByNick.end())
return it->second;
return NULL;
}