diff --git a/modules/nextstop/__init__.py b/modules/nextstop/__init__.py index 3b112f6..084a5a9 100644 --- a/modules/nextstop/__init__.py +++ b/modules/nextstop/__init__.py @@ -17,11 +17,14 @@ def help_full (): @hook("cmd_hook", "ratp") def ask_ratp(msg): """Hook entry from !ratp""" - if len(msg.cmds) == 4: + if len(msg.cmds) >= 4: transport = msg.cmds[1] line = msg.cmds[2] station = msg.cmds[3] - times = ratp.getNextStopsAtStation(transport, line, station) + if len(msg.cmds) == 5: + times = ratp.getNextStopsAtStation(transport, line, station, msg.cmds[4]) + else: + times = ratp.getNextStopsAtStation(transport, line, station) if len(times) == 0: raise IRCException("la station %s n'existe pas sur le %s ligne %s." % (station, transport, line)) diff --git a/modules/nextstop/external b/modules/nextstop/external index 060aad3..3d5c9b2 160000 --- a/modules/nextstop/external +++ b/modules/nextstop/external @@ -1 +1 @@ -Subproject commit 060aad3f42afe4185180e0ba952b72dc1cb4cac6 +Subproject commit 3d5c9b2d52fbd214f5aaad00e5f3952de919b3e5