*
*/
+#ifdef DLL_EXPORT
+#define IN_LIBCIT
+#endif
+
#include "sysdep.h"
#include <errno.h>
#include <stdlib.h>
#include "server.h"
#include "database.h"
#include "user_ops.h"
+#include "dynloader.h"
#include "sysdep_decls.h"
#include "support.h"
#include "room_ops.h"
#include "control.h"
#include "msgbase.h"
#include "config.h"
-#include "dynloader.h"
#include "tools.h"
#include "citserver.h"
void logout(struct CitContext *who)
{
who->logged_in = 0;
+
+ /*
+ * If there is a download in progress, abort it.
+ */
if (who->download_fp != NULL) {
fclose(who->download_fp);
who->download_fp = NULL;
}
+
+ /*
+ * If there is an upload in progress, abort it.
+ */
if (who->upload_fp != NULL) {
abort_upl(who);
}
+
+ /*
+ * If we were talking to a network node, we're not anymore...
+ */
+ if (strlen(who->net_node) > 0) {
+ network_talking_to(who->net_node, NTT_REMOVE);
+ }
+
/* Do modular stuff... */
PerformSessionHooks(EVT_LOGOUT);
}
struct usersupp usbuf;
struct cdbdata *cdbus;
- cdb_begin_transaction();
cdb_rewind(CDB_USERSUPP);
while (cdbus = cdb_next_item(CDB_USERSUPP), cdbus != NULL) {
cdb_free(cdbus);
(*CallBack) (&usbuf, in_data);
}
- cdb_end_transaction();
}