]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - data/rbot/plugins/games/quiz.rb
* (utils) should use partial_body() for non-text responses as well
[user/henk/code/ruby/rbot.git] / data / rbot / plugins / games / quiz.rb
index d73de90e0fced58b4dfef798a27c898b7605fc7c..37602fba7b62cfc1f394fcdf17d0ad4f58d3cc9d 100644 (file)
 # TODO:: when Ruby 2.0 gets out, fix the FIXME 2.0 UTF-8 workarounds
 
 # Class for storing question/answer pairs
-QuizBundle = Struct.new( "QuizBundle", :question, :answer )
+define_structure :QuizBundle, :question, :answer
 
 # Class for storing player stats
-PlayerStats = Struct.new( "PlayerStats", :score, :jokers, :jokers_time )
+define_structure :PlayerStats, :score, :jokers, :jokers_time
 # Why do we still need jokers_time? //Firetech
 
 # Maximum number of jokers a player can gain
@@ -156,11 +156,11 @@ end
 # CLASS QuizPlugin
 #######################################################################
 class QuizPlugin < Plugin
-  BotConfig.register BotConfigBooleanValue.new('quiz.dotted_nicks',
+  Config.register Config::BooleanValue.new('quiz.dotted_nicks',
     :default => true,
     :desc => "When true, nicks in the top X scores will be camouflaged to prevent IRC hilighting")
 
-  BotConfig.register BotConfigArrayValue.new('quiz.sources',
+  Config.register Config::ArrayValue.new('quiz.sources',
     :default => ['quiz.rbot'],
     :desc => "List of files and URLs that will be used to retrieve quiz questions")