]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/plugins.rb
wordlist: exist? method
[user/henk/code/ruby/rbot.git] / lib / rbot / plugins.rb
index d1bf073ac0e12132b1c9beeeb46959c56acb7d59..4d51cfc5e845d380cef3b1e588755dfe33353ef5 100644 (file)
@@ -179,6 +179,7 @@ module Plugins
     def initialize
       @manager = Plugins::manager
       @bot = @manager.bot
+      @priority = nil
 
       @botmodule_triggers = Array.new
 
@@ -539,7 +540,7 @@ module Plugins
       desc = desc.to_s + " " if desc
 
       begin
-        plugin_string = IO.readlines(fname).join("")
+        plugin_string = IO.read(fname)
         debug "loading #{desc}#{fname}"
         plugin_module.module_eval(plugin_string, fname)
         return :loaded
@@ -942,7 +943,7 @@ module Plugins
       if method.to_sym == :privmsg
         delegate('ctcp_listen', m) if m.ctcp
         delegate('message', m)
-        privmsg(m) if m.address?
+        privmsg(m) if m.address? and not m.ignored?
         delegate('unreplied', m) unless m.replied
       else
         delegate(method, m)