File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ multi method irc-privmsg-channel($msg) {
47
47
my $ nonword-ratio = $ msg . args[1 ]. comb (/<- alpha - space > /) ÷ $ msg . args[1 ]. chars ;
48
48
nextsame if $ nonword-ratio < 0.1 ; # skip if doesn't look like code at all
49
49
nextsame if $ msg . args[1 ] ~~ /^ \s * <[ \w- ] >+ ‘:’ /; # skip messages to other bots
50
+ nextsame if $ msg . args[1 ] eq ‘ ???’ ; # unfortunate trigger (???)
51
+ nextsame if $ msg . args[1 ] ~~ /^ \w + \s + ‘&’ \s * $ /; # unfortunate trigger (sleep &)
50
52
51
53
self . process: $ msg , $ msg . args[1 ], : good-only
52
54
}
Original file line number Diff line number Diff line change @@ -228,6 +228,12 @@ $t.test(‘segfaults are not ignored’,
228
228
‘ use NativeCall; sub strdup(int64) is native(Str) {*}; strdup(0)’ ,
229
229
/^ <me ($ t )>‘, rakudo-moar ’ <sha >‘: OUTPUT: «(signal SIGSEGV) »’ $ /);
230
230
231
+ $ t . test(‘ ignore common messages (sleep &)’ ,
232
+ ‘ sleep &’ );
233
+
234
+ $ t . test(‘ ignore common messages (???)’ ,
235
+ ‘ ???’ );
236
+
231
237
# Timeouts
232
238
233
239
$ t . test(‘ timeout’ ,
You can’t perform that action at this time.
0 commit comments