From f9c699e615d3debea80af458f15847debb21f543 Mon Sep 17 00:00:00 2001 From: Aleteoryx Date: Tue, 26 Nov 2024 21:42:06 -0500 Subject: [PATCH] improved heuristics (curse the french!); make the error logging code work --- src/algos/tclposting.tcl | 19 +++++++++++++++++++ src/ws.tcl | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/algos/tclposting.tcl b/src/algos/tclposting.tcl index 83c07b7..ea507cd 100644 --- a/src/algos/tclposting.tcl +++ b/src/algos/tclposting.tcl @@ -17,15 +17,34 @@ namespace eval ::algos::tclposting { { return [dict get $data commit record createdAt] } + + # bare minimum if {![regexp -nocase -- {\mtcl(/tk)?\M} $text] && ![regexp -- {\mTk\M} $text]} return + # blocklist if {[regexp -nocase -- [join { + {SYTRAL} + {F[eê]te ?des ?Lumi[eè]res} + {m[eé]tro} + {\mLyon(naise?s?)?\M} + {TCL\+Ve?Lo?} + + {Wok Mix} + + {youtu\.?be(\.com)[^ ]+(tk|tcl)} + {Title Tk} + {Tk (you|DM)\M} {Comic-Con Tk} {\mtvs?\M} {\d\d( ?"|( |-|)in(ch)?)} {television} + {Projector} + + {tcl-bookreviews} + {TopTenTuesday} + {DVDVR} {wrestling} {tk mclaren}} | ] $text]} return diff --git a/src/ws.tcl b/src/ws.tcl index fa0e031..0b36b97 100644 --- a/src/ws.tcl +++ b/src/ws.tcl @@ -270,8 +270,9 @@ namespace eval ::ws::c { [set callback($sock)] $sock close [dict get $frame data] } } - } return]} { + } result options]} { ${log}::error "error in websocket callback for ${sock}: $result" + ${log}::error "options: $options" } } } -- 2.45.2