15 changed files with 94 additions and 42 deletions
@ -1,19 +0,0 @@
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/perl |
||||
|
||||
use strict; |
||||
use warnings; |
||||
|
||||
use File::Find; |
||||
|
||||
my $sum; |
||||
|
||||
sub process |
||||
{ |
||||
return if -d; |
||||
return unless /\.p(l|m)$/; |
||||
my ($res) = `wc -l $_`; |
||||
$sum += ($res =~ /(\d+)/)[0]; |
||||
} |
||||
|
||||
find(\&process, "."); |
||||
print $sum . "\n" |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
package Counterattack; |
||||
|
||||
use Milkbone; |
||||
|
||||
register_hook("protocol_eviled", sub { |
||||
warn "$ARGS{-user} has warned you. Counterstrike initiated."; |
||||
hook("protocol_evil", -user => $ARGS{-user}); |
||||
|
||||
register_hook("msg_in_$ARGS{-user}", sub { |
||||
warn "Counterstrike completed"; |
||||
hook("protocol_evil", -user => $ARGS{-user}); |
||||
deregister_hook("msg_in_$ARGS{-user}"); |
||||
}); |
||||
}); |
||||
|
||||
1; |
Loading…
Reference in new issue