From 617b282bcd157896ccf630415b29022acd2aca62 Mon Sep 17 00:00:00 2001 From: Mark Kretschmann Date: Tue, 29 Aug 2006 16:46:57 +0000 Subject: [PATCH] * Fix: @commands was not initialized on a fresh registry. * Remove legacy registry migration code. --- data/rbot/plugins/script.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 431b5246..bf8182ce 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -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 -- 2.39.5