From: Giuseppe Bilotta Date: Thu, 3 Feb 2011 09:14:24 +0000 (+0100) Subject: quiz: refactor and localize admin help X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=7dbb7be418b2cf5c3587218210e3f22e4e1dbdb3;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git quiz: refactor and localize admin help --- diff --git a/data/rbot/plugins/games/quiz.rb b/data/rbot/plugins/games/quiz.rb index 96e2ad40..208846ed 100644 --- a/data/rbot/plugins/games/quiz.rb +++ b/data/rbot/plugins/games/quiz.rb @@ -300,7 +300,15 @@ class QuizPlugin < Plugin def help( plugin, topic="" ) if topic == "admin" - "Quiz game aministration commands (requires authentication): 'quiz autoask ' => enable/disable autoask mode. 'quiz autoask delay ' => delay next quiz by seconds when in autoask mode. 'quiz transfer [score] [jokers]' => transfer [score] points and [jokers] jokers from to (default is entire score and all jokers). 'quiz setscore ' => set 's score to . 'quiz setjokers ' => set 's number of jokers to . 'quiz deleteplayer ' => 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 ' => enable/disable autoask mode"), + _("'quiz autoask delay ' => delay next quiz by seconds when in autoask mode"), + _("'quiz transfer [score] [jokers]' => transfer [score] points and [jokers] jokers from to (default is entire score and all jokers)"), + _("'quiz setscore ' => set 's score to "), + _("'quiz setjokers ' => set 's number of jokers to "), + _("'quiz deleteplayer ' => 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 ' => show top 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(', ')}")