summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwrog <wrog>2007-06-02 21:34:36 (GMT)
committerwrog <wrog>2007-06-02 21:34:36 (GMT)
commita9dd72815ef9f6a015d8f42abfa1a55f599a645a (patch)
treebef2bf5b6e12b5dd5e3e283f2c477c7e203ac604
parent728e0c1aa980f3e3d4acbfd7013c2568b168bee1 (diff)
downloadmoo-cvs-a9dd72815ef9f6a015d8f42abfa1a55f599a645a.zip
moo-cvs-a9dd72815ef9f6a015d8f42abfa1a55f599a645a.tar.gz
moo-cvs-a9dd72815ef9f6a015d8f42abfa1a55f599a645a.tar.bz2
moo-cvs-a9dd72815ef9f6a015d8f42abfa1a55f599a645a.tar.xz
fix player_connect() so that the user_client_disconnected hook
sees a disconnected player, same as with server_close()
-rw-r--r--server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/server.c b/server.c
index 4fc8d12..a0fab78 100644
--- a/server.c
+++ b/server.c
@@ -1075,8 +1075,10 @@ player_connected(Objid old_id, Objid new_id, int is_newly_created)
if (existing_listener == new_h->listener)
call_notifier(new_id, new_h->listener, "user_reconnected");
else {
+ new_h->disconnect_me = 1;
call_notifier(new_id, existing_listener,
"user_client_disconnected");
+ new_h->disconnect_me = 0;
call_notifier(new_id, new_h->listener, "user_connected");
}
} else {
@@ -1796,6 +1798,10 @@ char rcsid_server[] = "$Id$";
/*
* $Log$
+ * Revision 1.12 2007/06/02 21:34:36 wrog
+ * fix player_connect() so that the user_client_disconnected hook
+ * sees a disconnected player, same as with server_close()
+ *
* Revision 1.11 2007/05/29 12:21:47 wrog
* fixes server panic (or lost messages) caused by attempting to write to freed network handle during #0:user_reconnected; removes the one case where server and network handles were not being freed together
*