|
Parse::Colloquy::Bot - Parse Colloquy bot/client terminal output |
Parse::Colloquy::Bot - Parse Colloquy bot/client terminal output
use strict; use Parse::Colloquy::Bot qw(:all); use Data::Dumper;
# ... connect to Colloquy and read from the server ... my $parsed = parse_line($raw_input); print Dumper($parsed);
=head1 DESCRIPTION
This module will parse the raw ``client'' or ``bot'' terminal line output from a connection to a Colloquy server.
Accepts a single scalar input line or an array of input. Will return a hash reference or array of hash references for each input line, depending on the context that the function called.
The following input line from Colloquy:
LISTTALK neech2 %hello my name is neech {perl}
Will be parsed in to the following structure:
$VAR1 = {
'raw' => 'LISTTALK neech2 %hello my name is neech {perl}',
'msgtype' => 'LISTTALK',
'person' => 'neech2',
'list' => '%perl'
'text' => 'hello my name is neech',
'args' => [
'hello',
'my',
'name',
'is',
'neech'
],
'command' => 'hello',
'cmdargs' => [
'my',
'name',
'is',
'neech'
],
'respond' => undef,
'time' => 1148224087,
};
the Colloquy::Data manpage, the Colloquy::Bot::Simple manpage, the Chatbot::TalkerBot manpage
$Id: Bot.pm 483 2006-05-22 21:36:46Z nicolaw $
Nicola Worthington <nicolaw@cpan.org>
Copyright 2006 Nicola Worthington.
This software is licensed under The Apache Software License, Version 2.0.
http://www.apache.org/licenses/LICENSE-2.0
|
Parse::Colloquy::Bot - Parse Colloquy bot/client terminal output |