Bot::Net::Util - miscellaneous utility functions


Bot-Net documentation  | view source Contained in the Bot-Net distribution.

Index


NAME

Top

Bot::Net::Util - miscellaneous utility functions

SYNOPSIS

Top

  my @args = Bot::Net::Util->parse_bot_command($message);

DESCRIPTION

Top

Provides utility functions for use elsewhere.

METHODS

Top

parse_bot_command MESSAGE

Returns an array of words found in the given message. This tries to sensibly break up a command. The string will be split on whitespace or grouped by quotes.

Quoted strings may contain quotes by containing a double-quote to escape it. For example,

  tell 'bob''s friend' """Hello World"""

would become:

  ('tell', "bob's friend", '"Hello World"')

AUTHORS

Top

Andrew Sterling Hanenkamp <hanenkamp@cpan.org>

COPYRIGHT AND LICENSE

Top


Bot-Net documentation  | view source Contained in the Bot-Net distribution.