diff options
author | Mark Kretschmann <markey@web.de> | 2006-08-01 12:26:40 +0000 |
---|---|---|
committer | Mark Kretschmann <markey@web.de> | 2006-08-01 12:26:40 +0000 |
commit | 2c691f2dc9e6e3e1571218a6ad9c131359d37ffd (patch) | |
tree | 7f8c252b3dac0a3274357ce90cf1608973489fb0 /data | |
parent | 05917e75de2cbd14071ef335f4c3129a33f30cf6 (diff) |
Fix the "list" function. Now counts the pages correctly.
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/script.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |