From ed0208578de00a756ade1e1632a84203a950dc86 Mon Sep 17 00:00:00 2001 From: Ryan Voots Date: Thu, 11 Mar 2010 17:27:17 -0500 Subject: [PATCH] fixing the plugins i broke when fixing some warnings --- plugins/cache_check.pm | 4 ++-- plugins/compose.pm | 4 ++-- plugins/eval.pm | 4 +++- plugins/factoids.pm | 7 +++---- plugins/karma_modify.pm | 4 ++-- plugins/more.pm | 3 ++- plugins/plugins.pm | 3 ++- plugins/seen.pm | 3 ++- 8 files changed, 18 insertions(+), 14 deletions(-) diff --git a/plugins/cache_check.pm b/plugins/cache_check.pm index 855d678..fbd0044 100644 --- a/plugins/cache_check.pm +++ b/plugins/cache_check.pm @@ -1,6 +1,6 @@ package Bot::BB3::Plugin::CacheCheck; use strict; - +no warnings 'void'; sub new { my( $class ) = @_; @@ -34,4 +34,4 @@ sub command { } -1; #Bot::BB3::Plugin::CacheCheck +"Bot::BB3::Plugin::CacheCheck" diff --git a/plugins/compose.pm b/plugins/compose.pm index 97b77f9..4b791cb 100644 --- a/plugins/compose.pm +++ b/plugins/compose.pm @@ -1,6 +1,6 @@ package Bot::BB3::Plugin::Compose; use strict; - +no warnings 'void'; sub new { my( $class ) = @_; my $self = bless {}, $class; @@ -111,7 +111,7 @@ sub runplugin { } -1 #"Bot::BB3::Plugin::Compose"; +"Bot::BB3::Plugin::Compose"; __DATA__ Supports composing multiple plugins together. That is, it allows you to feed the output of one plugin to another plugin. Syntax compose (eval (echo 2+2)). Note that it uses the first non whitespace character as the start-delimiter and the last non-whitespace as the end delimter. diff --git a/plugins/eval.pm b/plugins/eval.pm index 0bcb1eb..f9cd0db 100644 --- a/plugins/eval.pm +++ b/plugins/eval.pm @@ -8,6 +8,8 @@ use IO::Socket::INET; use Data::Dumper; use strict; +no warnings 'void'; + sub new { my( $class ) = @_; @@ -72,7 +74,7 @@ sub command { return( 'handled', $resultstr ); } -1 #"Bot::BB3::Plugin::Eval"; +"Bot::BB3::Plugin::Eval"; __DATA__ The eval plugin. Evaluates various different languages. Syntax, eval: code; also pleval deparse rbeval jseval pyeval phpeval k20eval luaeval jeval. diff --git a/plugins/factoids.pm b/plugins/factoids.pm index 907938d..7e15921 100644 --- a/plugins/factoids.pm +++ b/plugins/factoids.pm @@ -366,8 +366,7 @@ sub get_fact_search { my $results = $self->dbh->selectall_arrayref( "SELECT subject,copula,predicate FROM (SELECT factoid_id,subject,predicate FROM factoid GROUP BY original_subject) as subquery - WHERE subject like ? OR predicate like ? - GROUP BY original_subject", # using a subquery so that i can do this properly + WHERE subject like ? OR predicate like ?", # using a subquery so that i can do this properly {Slice => {}}, "%$body%", "%$body%", ); @@ -514,7 +513,7 @@ sub _soundex_matches { return [ map $_->[1], grep $_->[2] =~ /\S/, @$rows ]; } - -1 #"Bot::BB3::Plugin::Factoids"; +no warnings 'void'; +"Bot::BB3::Plugin::Factoids"; __DATA__ Learn or retrieve persistent factoids. "foo is bar" to store. "foo" to retrieve. try "forget foo" or "revisions foo" or "literal foo" or "revert $REV_ID" too. "macro foo is [echo bar]" or "func foo is [echo bar [arg]]" for compose macro factoids. The factoids/fact/call keyword is optional except in compose. Search to search for factoids that match. diff --git a/plugins/karma_modify.pm b/plugins/karma_modify.pm index 7e2cf7e..b38fcc0 100644 --- a/plugins/karma_modify.pm +++ b/plugins/karma_modify.pm @@ -70,5 +70,5 @@ sub handle { return; } - -1 #"Bot::BB3::Plugin::Karma_Modify"; +no warnings 'void'; +"Bot::BB3::Plugin::Karma_Modify"; diff --git a/plugins/more.pm b/plugins/more.pm index ffab491..456ea7b 100644 --- a/plugins/more.pm +++ b/plugins/more.pm @@ -58,6 +58,7 @@ sub post_process { } } -1#"Bot::BB3::Plugin::More"; +no warnings 'void'; +"Bot::BB3::Plugin::More"; __DATA__ More acts as a pager. It automatically truncates output that is too long and saves it in a buffer based on your name. Use the command `more` to access the remainder of the text. diff --git a/plugins/plugins.pm b/plugins/plugins.pm index 4a4e68e..c6166bd 100644 --- a/plugins/plugins.pm +++ b/plugins/plugins.pm @@ -17,7 +17,8 @@ sub command { return( "handled", $output ); } -1#"Bot::BB3::Plugin::Plugins"; +no warnings 'void'; +"Bot::BB3::Plugin::Plugins"; __DATA__ Returns a list of all of the loaded plugins for this bot. Syntax, plugins diff --git a/plugins/seen.pm b/plugins/seen.pm index d10c0e6..a76db80 100644 --- a/plugins/seen.pm +++ b/plugins/seen.pm @@ -87,7 +87,8 @@ sub handle { return; } -1#"Bot::BB3::Plugin::Seen"; +no warnings 'void'; +"Bot::BB3::Plugin::Seen"; __DATA__ The seen plugin. Attempts to keep track of every user the bot has 'seen'. Use the syntax, seen user; to ask the bot when it last saw the user named 'user'.