Posted: Sat Dec 17, 2005 9:55 pm Post subject: Chatbot::Alpha 2.03
Chatbot::Alpha 2.03
Change Log
Code:
Version 2.03
- Added ~REGEXP command.
- Added {random} tag.
- Added more information about #CODE on manpage.
- Updated Chatbot::Alpha::Syntax to support the new ~REGEXP command.
- Applied a patch to Syntax.pm to hopefully make automatic installation
run more smoothly.
Examples of New Commands
The ~ command (~REGEXP) is to be used as an alternative to +TRIGGER, for putting regexp directly into the trigger. Anything that would be put into $1 to $9 can be retrieved in <star1> through <star9>.
Code:
~ i (would have|would\'ve) done it
- Do you really think you <star1> done it?
~ i am (\d) years old
- A lot of people are <star1> years old.
The {random} tag will insert a random bit of text into the reply. It can be used as a one-word insertion or to insert a whole phrase (in which the pipe '|' is used). Extra white spaces in the one-word insertions are ignored as seen in the first example.
Code:
+ random test one
- This {random}reply trigger command {/random} has a random noun.
+ random test two
- Fortune Cookie: {random}You will be rich and famous.|You will
^ go to the moon.|You will suffer an agonizing death.{/random}