Not too bad.
A couple pointers though.
1) You don\'t need the backslash \"/\" when the command is between the brackets.
2) You may want to change \"$active\" to \"$chan\" to ensure that it triggers on the correct channel.
And xtr... why don\'t you review the comment rules before posting anything again.
1) Every message said in a channel that is 20 characters or more is saved in quotes.#channel.txt. These messages are then randomly chosen and sent to the designated channel upon typing the command: !quote
2) I\'ll update it to using only one \"on TEXT\" event soon.
3) I\'m not sure how I could make the variables any cleaner than they are. heh.
Quote System Commands: !quote - Displays a random quote recorded by the script. !quote info - Displays the number of available quotes. Records everything said on a channel if the length of message is greater than or equal to thirty characters. Those messages are sent to a text file. It does distinguish between different channels, and quotes the messages accordingly.
http://www.hawkee.com/snippet.php?snippet_id=1692
Odd how your script is very similar to the one above...