public
Description: An extensible bot for the Campfire web-based chat system #crc
Homepage:
Clone URL: git://github.com/timriley/campfire-bot.git
fixes to the seen plugin
timriley (author)
Mon Nov 24 05:00:06 -0800 2008
commit  4453765c016ab4c3c7cb6b77d9aaf19e1118814f
tree    2215577492a542d10adc8a36aa83ebe4636ac41a
parent  74ebc42c9a4a271a6e17204c9cc0db2d9964f537
...
4
5
6
7
 
8
9
10
...
27
28
29
30
 
31
32
33
...
4
5
6
 
7
8
9
10
...
27
28
29
 
30
31
32
33
0
@@ -4,7 +4,7 @@ class Seen < CampfireBot::Plugin
0
   SEEN_REGEXP = /(seen) ([^\?]+)(?=\?)*/
0
   
0
   on_message Regexp.new("#{ACTIVITY_REGEXP.source}", Regexp::IGNORECASE), :update
0
-  on_message Regexp.new("^#{Bot.instance.config['nickname']},\\s+#{SEEN_REGEXP.source}", Regexp::IGNORECASE), :seen
0
+  on_message Regexp.new("^#{bot.config['nickname']},\\s+#{SEEN_REGEXP.source}", Regexp::IGNORECASE), :seen
0
   on_command 'reload_seen', :reload
0
   
0
   def initialize
0
@@ -27,7 +27,7 @@ class Seen < CampfireBot::Plugin
0
     puts @seen
0
     puts msg[:message]
0
     
0
-    puts msg[:message] =~ Regexp.new("^#{Bot.instance.config['nickname']},\\s+#{SEEN_REGEXP.source}", Regexp::IGNORECASE)
0
+    puts msg[:message] =~ Regexp.new("^#{bot.config['nickname']},\\s+#{SEEN_REGEXP.source}", Regexp::IGNORECASE)
0
     puts $1, $2
0
     found = false
0
     

Comments