From d935d3d1b88c157909702264515cd42d6410793c Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 17 Oct 2009 20:24:10 +0000 Subject: Call I_OnUserConnect and display news before checking if the user should be killed by sessions, sessions checking can delete the user if the IRCd doesn't send QUITs on KILL which could cause a segfault git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2570 5417fbe8-f217-4b02-8779-1006273d7864 --- src/users.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/users.c b/src/users.c index 024b062db..33dc560c4 100644 --- a/src/users.c +++ b/src/users.c @@ -761,14 +761,14 @@ User *do_nick(const char *source, const char *nick, const char *username, const if (ircd->szline && ircd->nickip) check_szline(nick, ipbuf); - /* Now check for session limits */ - if (LimitSessions && !is_ulined(server)) - add_session(nick, host, ipbuf); + FOREACH_MOD(I_OnUserConnect, OnUserConnect(user)); display_news(user, NEWS_LOGON); display_news(user, NEWS_RANDOM); - FOREACH_MOD(I_OnUserConnect, OnUserConnect(user)); + /* Now check for session limits */ + if (LimitSessions && !is_ulined(server)) + add_session(nick, host, ipbuf); } else { /* An old user changing nicks. */ if (ircd->ts6) -- cgit