diff options
author | Adam <Adam@anope.org> | 2010-09-29 14:02:17 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-29 14:02:17 -0400 |
commit | 9d2ef3f13085cf46913eb743e2561ea217c866fa (patch) | |
tree | f2dad7f10cdd21a5e0be7d76cc229e00285d274c /src | |
parent | 6ca09be66341fd9f568fb0ac754df4f4c561bc1f (diff) |
Allow OnPreConnect to kill users correctly and made session/xline exempt users not bypass the OnConnect event
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp index 8ebe339ea..d4b1e15f2 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -762,18 +762,18 @@ User *do_nick(const Anope::string &source, const Anope::string &nick, const Anop EventReturn MOD_RESULT; FOREACH_RESULT(I_OnPreUserConnect, OnPreUserConnect(*user)); - if (MOD_RESULT == EVENT_STOP) - return *user; - if (Config->LimitSessions && !serv->IsULined()) - add_session(nick, host, user->ip() ? user->ip.addr() : ""); + if (user && MOD_RESULT != EVENT_STOP) + { + if (Config->LimitSessions && !serv->IsULined()) + add_session(nick, host, user->ip() ? user->ip.addr() : ""); - if (!user) - return NULL; + if (!user) + return NULL; - XLineManager::CheckAll(*user); + XLineManager::CheckAll(*user); + } - /* User is no longer connected, return */ if (!user) return NULL; |