From 28d6f2b82ffc2e66a7d36226040a282581700205 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 22 Jun 2014 12:46:49 +0200 Subject: [PATCH] Forbid hooks for certain functions --- chop.py | 3 ++- rssnotify.py | 1 + seen.py | 3 +++ tell.py | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chop.py b/chop.py index 3dbc4a7..5b6483c 100755 --- a/chop.py +++ b/chop.py @@ -7,7 +7,7 @@ import os, web, re chop = {} chop["badword_limit"] = 4 -chop["badword_enabled"] = True +chop["badword_enabled"] = False chop["badword_kickmsg"] = "Chop!" # "Stop using bad words!" chop["victims"] = {} # for future use badword_list = "" # TODO: Get badword list from somewhere @@ -145,6 +145,7 @@ def badword_watcher(phenny, input): badword_watcher.priority = 'high' badword_watcher.rule = r'.*' +badword_watcher.nohook = True def badword_ctrl(phenny, input): if not input.admin: return diff --git a/rssnotify.py b/rssnotify.py index 0f14f0b..48c24c4 100755 --- a/rssnotify.py +++ b/rssnotify.py @@ -125,6 +125,7 @@ def rsscheck(phenny, input): rsscheck.priority = 'medium' rsscheck.rule = r'.*' rsscheck.event = '*' +rsscheck.nohook = True if __name__ == '__main__': print __doc__.strip() diff --git a/seen.py b/seen.py index dd17834..b0daee8 100755 --- a/seen.py +++ b/seen.py @@ -86,6 +86,7 @@ def note(phenny, input): note.rule = r'.*' note.priority = 'low' note.thread = False +note.nohook = True def note_join(phenny, input): if input.sender.startswith('#'): @@ -95,6 +96,7 @@ note_join.rule = r'.*' note_join.event = 'JOIN' note_join.priority = 'low' note_join.thread = False +note_join.nohook = True def note_part(phenny, input): if input.sender.startswith('#'): @@ -104,6 +106,7 @@ note_part.rule = r'.*' note_part.event = 'PART' note_part.priority = 'low' note_part.thread = False +note_part.nohook = True db = sqlite3.connect("seen.sqlite") c = db.cursor() diff --git a/tell.py b/tell.py index 35aa713..fe71a9a 100755 --- a/tell.py +++ b/tell.py @@ -80,6 +80,7 @@ def note(phenny, input): note.rule = r'.*' note.priority = 'low' +note.nohook = True def note_join(phenny, input): if input.sender.startswith('#'): @@ -88,6 +89,7 @@ def note_join(phenny, input): note_join.rule = r'.*' note_join.event = 'JOIN' note_join.priority = 'low' +note_join.nohook = True db = sqlite3.connect("tell.sqlite") c = db.cursor()