#include "msgbase.h"
#include "support.h"
#include "sysdep_decls.h"
+#include "citserver.h"
#include "room_ops.h"
#include "user_ops.h"
#include "file_ops.h"
#define MSGS_LAST 4
#define MSGS_GT 5
+#define desired_section ((char *)CtdlGetUserData(SYM_DESIRED_SECTION))
+
extern struct config config;
if (CC->download_fp != NULL) return;
/* ...or if this is not the desired section */
- if (strcasecmp(CC->desired_section, partnum)) return;
+ if (strcasecmp(desired_section, partnum)) return;
snprintf(tmpname, sizeof tmpname,
"/tmp/CitServer.download.%4x.%4x", getpid(), ++seq);
if (CC->download_fp == NULL) {
cprintf("%d Section %s not found.\n",
ERROR+FILE_NOT_FOUND,
- CC->desired_section);
+ desired_section);
}
}
cdb_free(dmsgtext);
{
char msgid[256];
+ CtdlAllocUserData(SYM_DESIRED_SECTION, 64);
+
extract(msgid, cmdbuf, 0);
- extract(CC->desired_section, cmdbuf, 1);
+ extract(desired_section, cmdbuf, 1);
output_message(msgid, MT_DOWNLOAD, 0);
}