*
* A server-side module for Citadel designed to filter idiots off the network.
*
- * Copyright (c) 2002 / released under the GNU General Public License
+ * Copyright (c) 2002-2009 by the citadel.org team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdep.h"
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
+#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "policy.h"
#include "database.h"
#include "msgbase.h"
-#include "serv_network.h"
-#include "tools.h"
+#include "serv_network.h" /* Needed for defenition of FilterList */
#include "ctdl_module.h"
* is found, the message is rejected.
*/
int filter_the_idiots(struct CtdlMessage *msg, char *target_room) {
- struct FilterList *fptr;
+ FilterList *fptr;
int zap_user = 0;
int zap_room = 0;
int zap_node = 0;
CTDL_MODULE_INIT(netfilter)
{
- CtdlRegisterNetprocHook(filter_the_idiots);
-
+ if (!threading)
+ {
+ CtdlRegisterNetprocHook(filter_the_idiots);
+ }
+
/* return our Subversion id for the Log */
return "$Id$";
}