]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/script.rb
added 'alias rm' as alternative for 'alias remove'
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / script.rb
index 29afa20a62e183fea66450382ef1a91722b1bd21..5e2f1e58e1b9140eac4cfabae9a2e17384dfde70 100644 (file)
@@ -13,9 +13,7 @@
 # plugin. You can create them directly in an IRC channel, and invoke them just
 # like normal rbot plugins. 
 
-
-Command = Struct.new( "Command", :code, :nick, :created, :channel )
-
+define_structure :Command, :code, :nick, :created, :channel
 
 class ScriptPlugin < Plugin
 
@@ -23,6 +21,7 @@ class ScriptPlugin < Plugin
     super
     if @registry.has_key?(:commands)
       @commands = @registry[:commands]
+      raise unless @commands
     else
       @commands = Hash.new
     end