From 2c691f2dc9e6e3e1571218a6ad9c131359d37ffd Mon Sep 17 00:00:00 2001 From: Mark Kretschmann Date: Tue, 1 Aug 2006 12:26:40 +0000 Subject: [PATCH] Fix the "list" function. Now counts the pages correctly. --- data/rbot/plugins/script.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb index 8234442c..171dabcb 100644 --- a/data/rbot/plugins/script.rb +++ b/data/rbot/plugins/script.rb @@ -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 -- 2.39.2