$kernel->post( $src, $replypath, $reply, $dest );
}
+DICTCLEAN: |-
+ sub {
+ my( $kernel, $heap, $who, $what, $src, $dest, $replypath ) = @_;
+ $heap->{ 'DICT_cache' } = {};
+ $kernel->post( $src, $replypath, "Cleaned.", $dest );
+ }
+
DICT: |-
sub {
require WWW::Search;
}
if( $dict =~ m/^urban/i ) {
+ use HTML::Entities;
print( "DICT: Urban Dictionary", "\n" );
my $key = "84d324f8a5fcae301ec4aefcd258dff2";
print( "DICT: Backend reports $hits hit".($hits==1?"":"s"), "\n" );
}
my $response = $result->{ 'word' }.": ".$result->{ 'definition' };
+ $response = decode_entities( $response );
$response =~ s/\n/ /g;
print( "DICT: Fetched result\n" );
$heap->{ 'DICT_cache' }->{ 'URBAN' }->{ "$num.$what" } = $response;