diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-09 18:51:05 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-09 18:51:05 +0000 |
commit | 1f738f0ad4bda5dc824929d55819c7e10dd8a234 (patch) | |
tree | 905f6eb39919389b166678ef84ab541ce163d1cd /src | |
parent | af45426be5f04f669312fd873e463066082d7cbd (diff) |
Fixed a potential crash when a user does not pass connection checks (akill/session)
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2877 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/users.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/users.c b/src/users.c index 219ccadcd..c236efc3b 100644 --- a/src/users.c +++ b/src/users.c @@ -828,11 +828,11 @@ User *do_nick(const char *source, const char *nick, const char *username, const if (Config.LimitSessions && !is_ulined(server)) add_session(nick, host, ipbuf); - /* Only call I_OnUserConnect if the user still exists */ - if (finduser(nick)) - { - FOREACH_MOD(I_OnUserConnect, OnUserConnect(user)); - } + /* User is no longer connected, return */ + if (!finduser(nick)) + return NULL; + + FOREACH_MOD(I_OnUserConnect, OnUserConnect(user)); } else { /* An old user changing nicks. */ if (ircd->ts6) |