factoid commands: removed unnecessary direct privmsg call

This commit is contained in:
Pragmatic Software 2011-01-27 01:51:16 +00:00
parent 5d0f2f5b98
commit 31ae068202
2 changed files with 5 additions and 3 deletions

View File

@ -225,12 +225,14 @@ sub list {
return "Error in search parameters: $@";
}
my $text = "";
my @sorted = sort { $a->{timestamp} <=> $b->{timestamp} } @results;
foreach my $msg (@sorted) {
$self->{pbot}->logger->log("[$msg->{channel}] " . localtime($msg->{timestamp}) . " [o: $msg->{offenses}, j: $msg->{join_watch}] <$msg->{nick}> " . $msg->{text} . "\n");
$self->{pbot}->conn->privmsg($nick, "[$msg->{channel}] " . localtime($msg->{timestamp}) . " <$msg->{nick}> " . $msg->{text} . "\n") unless $nick =~ /\Q$botnick\E/i;
$text .= "[$msg->{channel}] " . localtime($msg->{timestamp}) . " <$msg->{nick}> " . $msg->{text} . "\n";
}
return "";
return "Messages: $text";
}
if($arguments =~ /^modules$/i) {

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 272,
BUILD_REVISION => 273,
BUILD_DATE => "2011-01-26",
};