]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix the "list" function. Now counts the pages correctly.
authorMark Kretschmann <markey@web.de>
Tue, 1 Aug 2006 12:26:40 +0000 (12:26 +0000)
committerMark Kretschmann <markey@web.de>
Tue, 1 Aug 2006 12:26:40 +0000 (12:26 +0000)
data/rbot/plugins/script.rb

index 8234442c840ca71186280c9887cc958638eac942..171dabcb5a813f73ce75fb22a0c4ce54afe61ef5 100644 (file)
@@ -112,7 +112,7 @@ class ScriptPlugin < Plugin
 
     cmds_per_page = 30
     cmds = @commands.keys.sort
-    num_pages = cmds.length / cmds_per_page
+    num_pages = cmds.length / cmds_per_page + 1
     page = params[:page].to_i
     page = [page, 1].max
     page = [page, num_pages].min