From c150e2018c24fad5494be2ca565d3858c490a723 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Mon, 21 Jun 2010 14:48:40 +0000 Subject: [PATCH] Make usage output of some commands visible in channel instead of msg --- PBot/FactoidCommands.pm | 16 ++++++++-------- PBot/VERSION.pm | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PBot/FactoidCommands.pm b/PBot/FactoidCommands.pm index 12a0efef..e9c9bc3f 100644 --- a/PBot/FactoidCommands.pm +++ b/PBot/FactoidCommands.pm @@ -84,7 +84,7 @@ sub factset { my ($channel, $trigger, $key, $value) = split / /, $arguments, 4 if defined $arguments; if(not defined $channel or not defined $trigger) { - return "/msg $nick Usage: factset [key ]" + return "Usage: factset [key ]" } return $self->{pbot}->factoids->factoids->set($channel, $trigger, $key, $value); @@ -96,10 +96,10 @@ sub factunset { my ($channel, $trigger, $key) = split / /, $arguments, 3 if defined $arguments; if(not defined $channel or not defined $trigger) { - return "/msg $nick Usage: factunset " + return "Usage: factunset " } - return "/msg $nick " . $self->{pbot}->factoids->factoids->unset($channel, $trigger, $key); + return $self->{pbot}->factoids->factoids->unset($channel, $trigger, $key); } sub list { @@ -206,7 +206,7 @@ sub alias { my ($alias, $command) = $arguments =~ /^(.*?)\s+(.*)$/ if defined $arguments; if(not defined $command) { - return "/msg $nick Usage: alias "; + return "Usage: alias "; } $from = '.*' if not defined $from or $from !~ /^#/; @@ -243,7 +243,7 @@ sub add_regex { } if(not defined $text) { - return "/msg $nick Usage: regex "; + return "Usage: regex "; } my ($channel, $trigger) = $self->{pbot}->factoids->find_factoid($from, $keyword, undef, 1); @@ -350,7 +350,7 @@ sub show { my ($chan, $trig) = split / /, $arguments; if(not defined $chan or not defined $trig) { - return "/msg $nick Usage: show "; + return "Usage: show "; } my ($channel, $trigger) = $self->{pbot}->factoids->find_factoid($chan, $trig); @@ -374,13 +374,13 @@ sub info { my ($chan, $trig) = split / /, $arguments; if(not defined $chan or not defined $trig) { - return "/msg $nick Usage: info "; + return "Usage: info "; } my ($channel, $trigger) = $self->{pbot}->factoids->find_factoid($chan, $trig); if(not defined $trigger) { - return "/msg $nick '$trig' not found in channel '$chan' (did you mean channel '.*'?"; + return "'$trig' not found in channel '$chan' (did you mean channel '.*'?"; } my $created_ago = ago(gettimeofday - $factoids->{$channel}->{$trigger}->{created_on}); diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 3580323b..a9431f9c 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 193, + BUILD_REVISION => 194, BUILD_DATE => "2010-06-21", };