diff options
Diffstat (limited to 'src/users.cpp')
-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; |