]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
quiz: refactor and localize admin help
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 3 Feb 2011 09:14:24 +0000 (10:14 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 3 Feb 2011 09:14:24 +0000 (10:14 +0100)
data/rbot/plugins/games/quiz.rb

index 96e2ad402e520f3d30c552a890a184d4cd6edef4..208846edcca290490b1104824d7a3e6cb973956b 100644 (file)
@@ -300,7 +300,15 @@ class QuizPlugin < Plugin
 
   def help( plugin, topic="" )
     if topic == "admin"
-      "Quiz game aministration commands (requires authentication): 'quiz autoask <on/off>' => enable/disable autoask mode. 'quiz autoask delay <secs>' => delay next quiz by <secs> seconds when in autoask mode. 'quiz transfer <source> <dest> [score] [jokers]' => transfer [score] points and [jokers] jokers from <source> to <dest> (default is entire score and all jokers). 'quiz setscore <player> <score>' => set <player>'s score to <score>. 'quiz setjokers <player> <jokers>' => set <player>'s number of jokers to <jokers>. 'quiz deleteplayer <player>' => delete one player from the rank table (only works when score and jokers are set to 0). 'quiz cleanup' => remove players with no points and no jokers."
+      _("Quiz game aministration commands (requires authentication): ") + [
+        _("'quiz autoask <on/off>' => enable/disable autoask mode"),
+        _("'quiz autoask delay <secs>' => delay next quiz by <secs> seconds when in autoask mode"),
+        _("'quiz transfer <source> <dest> [score] [jokers]' => transfer [score] points and [jokers] jokers from <source> to <dest> (default is entire score and all jokers)"),
+        _("'quiz setscore <player> <score>' => set <player>'s score to <score>"),
+        _("'quiz setjokers <player> <jokers>' => set <player>'s number of jokers to <jokers>"),
+        _("'quiz deleteplayer <player>' => delete one player from the rank table (only works when score and jokers are set to 0)"),
+        _("'quiz cleanup' => remove players with no points and no jokers")
+      ].join(". ")
     else
       urls = @bot.config['quiz.sources'].select { |p| p =~ /^https?:\/\// }
       "A multiplayer trivia quiz. 'quiz' => ask a question. 'quiz hint' => get a hint. 'quiz solve' => solve this question. 'quiz skip' => skip to next question. 'quiz joker' => draw a joker to win this round. 'quiz score [player]' => show score for [player] (default is yourself). 'quiz top5' => show top 5 players. 'quiz top <number>' => show top <number> players (max 50). 'quiz stats' => show some statistics. 'quiz fetch' => refetch questions from databases. 'quiz refresh' => refresh the question pool for this channel." + (urls.empty? ? "" : "\nYou can add new questions at #{urls.join(', ')}")