Ignore:
Timestamp:
11/26/10 03:10:18 (14 years ago)
Author:
nanardon
Message:
  • start explorer page
  • some function in Chat/
File:
1 edited

Legend:

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

    r36 r38  
    22use Moose; 
    33use namespace::autoclean; 
     4use Getopt::Long; 
     5use Text::ParseWords; 
    46 
    57BEGIN {extends 'Catalyst::Controller'; } 
     
    2830} 
    2931 
    30  
    3132sub message : XMLRPC { 
    3233    my ($self, $c, $contexts, $message) = @_; 
     
    4849    } 
    4950 
    50     $c->stash->{xmlrpc} = $c->forward($c->model('Chat'), [ $reqspec, $message ]);  
    51      
     51    my ($cmd, @args) = Text::ParseWords::shellwords($message); 
     52 
     53    if ($c->get_action( $cmd, '/chat/cmd' )) { 
     54        $c->forward('/chat/cmd/' . $cmd, [ $reqspec, @args ]); 
     55    } 
    5256} 
    5357 
Note: See TracChangeset for help on using the changeset viewer.