]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/ircbot.rb
rdocument Irc::MessageMapper and Irc::MessageTemplate
[user/henk/code/ruby/rbot.git] / lib / rbot / ircbot.rb
index fd34667097fb834dc657949a2c89dbebb55888f7..e171384008d1481cbbe3e633fa21c239146e7ff1 100644 (file)
@@ -1,3 +1,8 @@
+#-- vim:sw=2:et
+#++
+#
+# :title: rbot core
+
 require 'thread'
 
 require 'etc'
@@ -25,7 +30,10 @@ end
 class Exception
   def pretty_print(q)
     q.group(1, "#<%s: %s" % [self.class, self.message], ">") {
-      q.seplist(self.backtrace, lambda { "\n" }) { |v| v } if self.backtrace
+      if self.backtrace and not self.backtrace.empty?
+        q.text "\n"
+        q.seplist(self.backtrace, lambda { q.text "\n" } ) { |l| q.text l }
+      end
     }
   end
 end
@@ -115,6 +123,7 @@ module Irc
 # handles them or passes them to plugins, and contains core functionality.
 class Bot
   COPYRIGHT_NOTICE = "(c) Tom Gilbert and the rbot development team"
+  SOURCE_URL = "http://linuxbrit.co.uk/rbot"
   # the bot's Auth data
   attr_reader :auth
 
@@ -539,8 +548,9 @@ class Bot
 
       unless ignored
         @plugins.delegate "listen", m
+        @plugins.delegate("ctcp_listen", m) if m.ctcp
         @plugins.privmsg(m) if m.address?
-       if not m.replied
+        if not m.replied
           @plugins.delegate "unreplied", m
         end
       end