package Counterattack; use Milkbone; use Milkbone::AllHooks; use base 'Milkbone::AllHooks'; register_hook("protocol_eviled", sub { error(-short => "$ARGS{-user} has warned you. Counterstrike initiated."); protocol_evil(-user => $ARGS{-user}); register_hook("msg_in_$ARGS{-user}", sub { warn "Counterstrike completed"; protocol_evil(-user => $ARGS{-user}); deregister_hook("msg_in_$ARGS{-user}"); }, {-user => $ARGS{-user}}); }); register_hook("msg_in", sub { deregister_hook("protocol_eviled"); }); 1;