def cmd_top5( m, params )
q = create_quiz( m.target.to_s )
-
- debug q.rank_table.inspect
+ if q.rank_table.empty?
+ m.reply "There are no scores known yet!"
+ return
+ end
m.reply "* Top 5 Players for #{m.target.to_s}:"
num = params[:number].to_i
return unless 1..50 === num
q = create_quiz( m.target.to_s )
-
- debug q.rank_table.inspect
+ if q.rank_table.empty?
+ m.reply "There are no scores known yet!"
+ return
+ end
ar = []
m.reply "* Top #{num} Players for #{m.target.to_s}:"
score = player[1].score
ar << "#{i + 1}. #{unhilight_nick( nick )} (#{score})"
end
- str = ar.join(" | ")
-
- if str.empty?
- m.reply "Noone in #{m.target.to_s} has a score!"
- else
- m.reply str
- end
+ m.reply ar.join(" | ")
end