$Log$
+ Revision 580.57 2001/10/15 19:50:50 ajc
+ * Fixed a bug in the loopzapper that was corrupting the use table saved copy.
+ * Post notification in Aide> when the loopzapper catches a message.
+
Revision 580.56 2001/10/12 22:41:11 ajc
* Wrote the rest of the use table code. Finished except for a bug.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
/*
* FIXME
* Don't allow polls during network processing
- * Use table isn't saving properly across sessions
*/
#include "sysdep.h"
stlen = stlen + strlen(uptr->message_id) + 20;
}
serialized_table = mallok(stlen);
+ memset(serialized_table, 0, stlen);
while (ut != NULL) {
- if (serialized_table != NULL) {
+ if ( (serialized_table != NULL)
+ && ( (ut->timestamp - time(NULL)) <
+ USETABLE_RETAIN) ) {
sprintf(&serialized_table[strlen(
serialized_table)], "%s|%ld\n",
ut->message_id,
char *oldpath = NULL;
char filename[SIZ];
FILE *fp;
+ char buf[SIZ];
/* Set default target room to trash */
strcpy(target_room, TWITROOM);
* Check to see if we already have a copy of this message
*/
if (network_usetable(UT_INSERT, msg) != 0) {
- /* FIXME - post a msg in Aide> telling us what happened */
+ sprintf(buf, "Loopzapper rejected message <%s>\n",
+ msg->cm_fields['I']);
+ aide_message(buf);
CtdlFreeMessage(msg);
msg = NULL;
return;