diff options
| author | 2026-01-07 01:25:17 +0000 | |
|---|---|---|
| committer | 2026-01-06 19:00:59 -0700 | |
| commit | af7bf73fbbda47dbef8ebcd96559bfb84e1e030d (patch) | |
| tree | 420dd0b9a5d5636a60d0a943d43c12788e6228ae /lilykarma.tcl | |
| parent | lilykarma: remove whitespace at end of line (diff) | |
lilykarma: implement more ignores
Diffstat (limited to 'lilykarma.tcl')
| -rw-r--r-- | lilykarma.tcl | 31 |
1 files changed, 31 insertions, 0 deletions
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 "*"]} { |
