summaryrefslogtreecommitdiff
path: root/src/sessions.c
diff options
context:
space:
mode:
authoradam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-07-26 22:29:37 +0000
committeradam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-07-26 22:29:37 +0000
commit10be3e9bb5287f7777d6f191d5e8b3ae8edd6197 (patch)
treea2f0440f83c5c05a1b77519473b997c9fbf6d148 /src/sessions.c
parentb2a57b09742da6c2f2011ad41eb470139d88e14f (diff)
Fixed multiple problems with session tracking, read comments in users.c and sessions.c for more info
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2393 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/sessions.c')
-rw-r--r--src/sessions.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sessions.c b/src/sessions.c
index 27c973d69..3ea37d9ca 100644
--- a/src/sessions.c
+++ b/src/sessions.c
@@ -151,9 +151,14 @@ int add_session(const char *nick, const char *host, char *hostip)
if (SessionLimitDetailsLoc)
ircdproto->SendMessage(findbot(s_OperServ), nick, "%s", SessionLimitDetailsLoc);
- /* We don't use kill_user() because a user stucture has not yet
- * been created. Simply kill the user. -TheShadow
+ /* Previously on IRCds that send a QUIT (InspIRCD) when a user is killed, the session for a host was
+ * decremented in do_quit, which caused problems and fixed here
+ *
+ * Now, we create the user struture before calling this (to fix some user tracking issues..
+ * read users.c), so we must increment this here no matter what because it will either be
+ * decremented in do_kill or in do_quit - Adam
*/
+ session->count++;
kill_user(s_OperServ, nick, "Session limit exceeded");
session->hits++;