Ignore:
Timestamp:
12/30/10 20:05:46 (13 years ago)
Author:
nanardon
Message:
  • delete old paste (when new one is request)
  • paste title is the command line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/lib/Sophie/Controller/Chat/Cmd.pm

    r240 r245  
    4747 
    4848    if ($needpaste && !$reqspec->{nopaste}) { 
    49         my $id = $c->forward('/chat/paste', [ 'Bot paste', join("\n", @backup) ]); 
     49        my $cmd = ($c->action =~ /([^\/]+)$/)[0]; 
     50        my (undef, undef, @args) = @{ $c->req->arguments }; 
     51        my $title = join(' ', $cmd, @args);  
     52        my $id = $c->forward('/chat/paste', [ $title, join("\n", @backup) ]); 
    5053        if ($id) { 
    5154            push(@{ $message->{message} }, 'All results available here: ' . $c->uri_for('/chat', $id)); 
Note: See TracChangeset for help on using the changeset viewer.