Changeset 38 for server/trunk/web/lib/Sophie/Controller/Chat.pm
- Timestamp:
- 11/26/10 03:10:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Chat.pm
r36 r38 2 2 use Moose; 3 3 use namespace::autoclean; 4 use Getopt::Long; 5 use Text::ParseWords; 4 6 5 7 BEGIN {extends 'Catalyst::Controller'; } … … 28 30 } 29 31 30 31 32 sub message : XMLRPC { 32 33 my ($self, $c, $contexts, $message) = @_; … … 48 49 } 49 50 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 } 52 56 } 53 57
Note: See TracChangeset
for help on using the changeset viewer.