| IRC-Bot-Hangman documentation | Contained in the IRC-Bot-Hangman distribution. |
IRC::Bot::Hangman::Command::Profanity - Profanity filter
See IRC::Bot::Hangman
This module is a plugin providing profanity filtering.
<hangman> *profanity word*
This plugin's name = 'profanity'
Filter out any profanity
Pierre Denis <pierre@itrelease.net>
http://www.itrelease.net/
Copyright 2005 IT Release Ltd - All Rights Reserved.
This module is released under the same license as Perl itself.
| IRC-Bot-Hangman documentation | Contained in the IRC-Bot-Hangman distribution. |
package IRC::Bot::Hangman::Command::Profanity; use warnings::register; use strict; use Regexp::Common qw/profanity/; use Carp qw( carp );
sub name () { 'profanity' }
sub pre_process { my $self = shift; my $robot = shift; return unless ($robot->input =~ /$RE{profanity}/); $robot->set_response( 'profanity' ); } 1;