<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,26 +3,43 @@ class Accountability &lt; CampfireBot::Plugin
   at_interval 5.minutes, :keep_them_honest
   
   def initialize
-    @informative_people = []
-    @room = bot.rooms[bot.config['accountability_room']]
+    @accountable_people = []
   end
   
   def save_speaker(msg)
-    if msg[:room] == bot.config['accountability_room']
-      @informative_people &lt;&lt; msg[:person] unless @informative_people.include?(msg[:person])
+    if msg[:room].name == accountability_room.name
+      puts &quot;WE'RE IN!&quot;
+      @accountable_people &lt;&lt; strip_tags(msg[:person]) unless @accountable_people.include?(strip_tags(msg[:person]))
     end
   end
   
   def keep_them_honest(msg)
-    now = Time.now
-    
-    # Only do this once a day, sometime between 11:00 and 11:05.
-    if (Time.mktime(now.year, now.month, now.day, 11, 0)..Time.mktime(now.year, now.month, now.day, 11, 5)).include?(now)
-      (@room.users - @informative_people).each do |person|
+    if accountability_time?
+      unaccountable_people.each do |person|
         @room.speak(&quot;#{person}: We haven't seen your INDAY today. So what's the plan?&quot;)
       end
       
-      @informative_people.clear
+      @accountable_people.clear
     end
   end
+  
+  private
+  
+  def unaccountable_people
+    accountability_room.users.map { |u| strip_tags(u) } - @accountable_people - [bot.config['nickname']]
+  end
+  
+  def accountability_room
+    @room ||= bot.rooms[bot.config['accountability_room']] || bot.rooms.first
+  end
+  
+  def accountability_time?
+    # Once a day, sometime between 11:00 and 11:05.
+    now = Time.now
+    (Time.mktime(now.year, now.month, now.day, 11, 0)..Time.mktime(now.year, now.month, now.day, 11, 5)).include?(now)
+  end
+  
+  def strip_tags(str)
+    str.gsub(/&lt;\/?[^&gt;]*&gt;/, '').strip
+  end
 end
\ No newline at end of file</diff>
      <filename>plugins/accountability.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94801691a96bd7c40f1a99c1bd8605ca1ff28a4c</id>
    </parent>
  </parents>
  <author>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </author>
  <url>http://github.com/timriley/campfire-bot/commit/3f94bb6ded34dccd82ea347c82a4b96e237dc0c9</url>
  <id>3f94bb6ded34dccd82ea347c82a4b96e237dc0c9</id>
  <committed-date>2009-08-03T21:10:25-07:00</committed-date>
  <authored-date>2009-08-03T21:10:25-07:00</authored-date>
  <message>fixes to make Accountability work properly.</message>
  <tree>d5f8e3c98b2270a3b4b37d49c49be5fe43dbd398</tree>
  <committer>
    <name>Tim Riley</name>
    <email>tim@openmonkey.com</email>
  </committer>
</commit>
