From af7bf73fbbda47dbef8ebcd96559bfb84e1e030d Mon Sep 17 00:00:00 2001 From: klea Date: Wed, 7 Jan 2026 01:25:17 +0000 Subject: lilykarma: implement more ignores --- lilykarma.tcl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'lilykarma.tcl') diff --git a/lilykarma.tcl b/lilykarma.tcl index 133fa5c..60a1e76 100644 --- a/lilykarma.tcl +++ b/lilykarma.tcl @@ -131,6 +131,37 @@ proc fixkarma {nick uhost hand chan text} { # return 0 #} + # ignore things that begin with common certificate headers + if {[string match "---*---" $text]} { + if {[string match "++" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - matches ---*--- $nick!$uhost ($acct) ++'d '$item' in $chan" + } elseif {[string match "--" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - matches ---*--- $nick!$uhost ($acct) --'d '$item' in $chan" + } + return 0 + } + + # ignore things that begin with "http" + if {[string match "http*" $text]} { + if {[string match "++" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - starts with http* $nick!$uhost ($acct) ++'d '$item' in $chan" + } elseif {[string match "--" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - starts with http* $nick!$uhost ($acct) --'d '$item' in $chan" + } + return 0 + } + + # ignore things that contain a "://" + if {[string match "*://*" $text]} { + if {[string match "++" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - seems like url *://* $nick!$uhost ($acct) ++'d '$item' in $chan" + } elseif {[string match "--" $score]} { + puthelp "PRIVMSG $karma(logchan) :\[karma\] *ignored - seems like url *://* $nick!$uhost ($acct) --'d '$item' in $chan" + } + return 0 + } + + # ignore karma requests from bots set accthand [finduser -account [getaccount $nick]] if {[string match $accthand "*"]} { -- cgit v1.3.1-10-gc9f91