diff options
author | Adam <Adam@anope.org> | 2014-05-21 08:50:40 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-05-21 08:50:40 -0400 |
commit | f627a3bacd0d058e94260dac1555790cafd9a926 (patch) | |
tree | 4ba71bf94b44ba07abc627ba0c26f3b8b94da439 /src/users.cpp | |
parent | 5a1257b7f0b44ee3fd4639e5be288d160ceb5095 (diff) |
Core prep for p10 stuff
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp index 8a4246e2f..2a04fca20 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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; } |