From: Mark Kretschmann Date: Tue, 29 Aug 2006 16:46:57 +0000 (+0000) Subject: * Fix: @commands was not initialized on a fresh registry. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=617b282bcd157896ccf630415b29022acd2aca62;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git * Fix: @commands was not initialized on a fresh registry. * Remove legacy registry migration code. --- 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