diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-10-31 16:35:42 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-10-31 16:35:42 -0500 |
commit | 38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3 (patch) | |
tree | 980adad0d4ae52d849884772f8266e1bd4e0a329 /lib | |
parent | cceeacee1d59a40b903df1c87f0aaf2ff9565093 (diff) | |
download | im-engine-plugin-commands-38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3.tar.gz im-engine-plugin-commands-38f55eb253d9dd5b16de1ab37da2014dfd2a3ed3.zip |
clone the last message, don't just try to recreate it
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IM/Engine/Plugin/Commands/Command/Help.pm | 5 |
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); |