]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
* Fix: @commands was not initialized on a fresh registry.
authorMark Kretschmann <markey@web.de>
Tue, 29 Aug 2006 16:46:57 +0000 (16:46 +0000)
committerMark Kretschmann <markey@web.de>
Tue, 29 Aug 2006 16:46:57 +0000 (16:46 +0000)
* Remove legacy registry migration code.

data/rbot/plugins/script.rb

index 431b52463d4b04313e03a7a750a6bc9535ab3005..bf8182cee98eb06e1d82141fa4e462db793509f2 100644 (file)
@@ -18,18 +18,9 @@ class ScriptPlugin < Plugin
     super
     if @registry.has_key?(:commands)
       @commands = @registry[:commands]
-    end
-    
-    if @commands.nil?
+    else
       @commands = Hash.new
     end
-
-    # Migrate old Hash to new:
-    @commands.each_pair do |name, cmd|
-      unless cmd.instance_of?( Command )
-        @commands[name] = Command.new( cmd, 'unknown hacker', 'somedate', '#somechan' )
-      end
-    end
   end