plugins PLUGIN_DENY and PLUGIN_PURGE are not called for hosts received via synchronization with denyhosts server
Logged In: NO
That patch should do the trick ... i think
--- original-sync.py 2006-02-09 07:20:00.000000000 +0200 +++ modified-sync.py 2007-11-03 10:41:04.000000000 +0200 @@ -2,6 +2,7 @@ import logging import os import time +import plugin from constants import SYNC_TIMESTAMP, SYNC_HOSTS, SYNC_HOSTS_TMP, SYNC_RECEIVED_HOSTS debug = logging.getLogger("sync").debug info = logging.getLogger("sync").info @@ -127,6 +128,8 @@
def __save_received_hosts(self, hosts, timestamp): try: + plugin_deny = self.__prefs.get('PLUGIN_DENY') + if plugin_deny: plugin.execute(plugin_deny, deny_hosts) fp = open(os.path.join(self.__work_dir, SYNC_RECEIVED_HOSTS), "a") except: error(e)
Log in to post a comment.
Logged In: NO
That patch should do the trick ... i think
--- original-sync.py 2006-02-09 07:20:00.000000000 +0200
+++ modified-sync.py 2007-11-03 10:41:04.000000000 +0200
@@ -2,6 +2,7 @@
import logging
import os
import time
+import plugin
from constants import SYNC_TIMESTAMP, SYNC_HOSTS, SYNC_HOSTS_TMP, SYNC_RECEIVED_HOSTS
debug = logging.getLogger("sync").debug
info = logging.getLogger("sync").info
@@ -127,6 +128,8 @@
def __save_received_hosts(self, hosts, timestamp):
try:
+ plugin_deny = self.__prefs.get('PLUGIN_DENY')
+ if plugin_deny: plugin.execute(plugin_deny, deny_hosts)
fp = open(os.path.join(self.__work_dir, SYNC_RECEIVED_HOSTS), "a")
except:
error(e)