Fix checking for page 0 in saylol.py listing
I hope I'm not making this too messy
This commit is contained in:
@@ -72,9 +72,11 @@ def on_lol_command(sender, command, label, args):
|
|||||||
arg1 = args[1] if len(args) > 1 else None
|
arg1 = args[1] if len(args) > 1 else None
|
||||||
if not arg1:
|
if not arg1:
|
||||||
arg1 = "1"
|
arg1 = "1"
|
||||||
if not arg1.isdigit() or arg1 == "0":
|
if not arg1.isdigit():
|
||||||
msg(sender, "&cInvalid argument \"%s\"" % arg1)
|
msg(sender, "&cInvalid argument \"%s\"" % arg1)
|
||||||
return True
|
return True
|
||||||
|
if int(arg1) == 0:
|
||||||
|
msg(sender, "&cPage 0 does not exist")
|
||||||
arg1 = int(arg1) - 1
|
arg1 = int(arg1) - 1
|
||||||
offset = list_limit * arg1
|
offset = list_limit * arg1
|
||||||
if offset > len(lols):
|
if offset > len(lols):
|
||||||
|
|||||||
Reference in New Issue
Block a user