summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-10-31 16:35:42 -0500
committerJesse Luehrs <doy@tozt.net>2009-10-31 16:35:42 -0500
commit38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3 (patch)
tree980adad0d4ae52d849884772f8266e1bd4e0a329
parentcceeacee1d59a40b903df1c87f0aaf2ff9565093 (diff)
downloadim-engine-plugin-commands-38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3.tar.gz
im-engine-plugin-commands-38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3.zip
clone the last message, don't just try to recreate it
-rw-r--r--lib/IM/Engine/Plugin/Commands/Command/Help.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/IM/Engine/Plugin/Commands/Command/Help.pm b/lib/IM/Engine/Plugin/Commands/Command/Help.pm
index f400157..5847414 100644
--- a/lib/IM/Engine/Plugin/Commands/Command/Help.pm
+++ b/lib/IM/Engine/Plugin/Commands/Command/Help.pm
@@ -10,8 +10,9 @@ sub default {
my ($sender, $action) = @_;
$self->is_active(0);
my $prefix = $self->_ime_plugin->prefix;
- my $message = IM::Engine::Incoming->new(
- sender => $self->_ime_plugin->_last_message->sender,
+ my $last_message = $self->_ime_plugin->_last_message;
+ my $message = $last_message->meta->clone_object(
+ $last_message,
message => "${prefix}$action -help",
);
return $self->_ime_plugin->incoming($message);