<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,8 @@
+# TODO
+#
+# - convert/filter out HTML entities like &amp;quot;
+# - do the right thing when a paste occurs (remove the 'view paste' but keep the content)
+
 class Boop &lt; CampfireBot::Plugin
   
   # Markov chain implementation courtesy of http://blog.segment7.net/articles/2006/02/25/markov-chain
@@ -23,7 +28,7 @@ class Boop &lt; CampfireBot::Plugin
   
   def random_chatter(msg)
     puts &quot;random_chatter&quot;
-    speak(get_sentences)
+    speak(generate_line)
   end
   
   def focused_chatter(msg)
@@ -33,14 +38,20 @@ class Boop &lt; CampfireBot::Plugin
   def load_transcripts(msg)
     speak(&quot;Filling my brain with transcripts...&quot;)
     
-    bot.room.available_transcripts.each do |date|
+    puts &quot;available transcripts - #{bot.room.available_transcripts.to_yaml}&quot;
+    
+    bot.room.available_transcripts.to_a.each do |date|
+      puts &quot;loading transcript #{date}&quot;
+      
       transcript = bot.room.transcript(date)
       
       transcript.each do |message|
+        puts &quot;message: #{message[:message]}&quot;
+        
         filtered_text = strip_message(message)
         add_line(filtered_text.gsub(/([^\.])$/, '\1.')) unless filtered_text.blank?
         
-        puts filtered_text.gsub(/([^\.])$/, '\1.') unless filtered_text.blank?
+        puts &quot;ACCEPTED: &quot; + filtered_text.gsub(/([^\.])$/, '\1.') unless filtered_text.blank?
       end
     end
     
@@ -62,13 +73,13 @@ class Boop &lt; CampfireBot::Plugin
   def generate_line
     # our seed phrase
     # phrase = words[0, phrase_length]
-    phrase = random_word
+    phrase = [random_word]
 
     output = []
 
-    @max_words.times do
+    @word_count.times do
       # grab all possibilities for our state
-      options = phrases[phrase]
+      options = @phrases[phrase]
 
       # add the first word to our output and discard
       output &lt;&lt; phrase.shift
@@ -81,8 +92,8 @@ class Boop &lt; CampfireBot::Plugin
       break if phrase.compact.empty? # all out of words
     end
 
-    # print out our output
-    puts output.join(' ')
+    # return our output
+    output.join(' ')
   end
     
   def random_word</diff>
      <filename>plugins/boop.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c95f46594528e233b4e1f4000e2ff7efb680bf8</id>
    </parent>
  </parents>
  <author>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </author>
  <url>http://github.com/timriley/campfire-bot/commit/9077b5a2d50e21ce2fe2f55a7e0eeff2ae52af04</url>
  <id>9077b5a2d50e21ce2fe2f55a7e0eeff2ae52af04</id>
  <committed-date>2008-10-31T00:16:26-07:00</committed-date>
  <authored-date>2008-10-31T00:16:26-07:00</authored-date>
  <message>got the markov plugin to a working state. it now responds to the channel with generated lines</message>
  <tree>2999930bac64434c7087c2ce6238ce99eae7bbd0</tree>
  <committer>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </committer>
</commit>
