[nextstop] Updated nextstop with destination option
This commit is contained in:
parent
b75c54419f
commit
6e226f0fb3
@ -17,10 +17,13 @@ def help_full ():
|
|||||||
@hook("cmd_hook", "ratp")
|
@hook("cmd_hook", "ratp")
|
||||||
def ask_ratp(msg):
|
def ask_ratp(msg):
|
||||||
"""Hook entry from !ratp"""
|
"""Hook entry from !ratp"""
|
||||||
if len(msg.cmds) == 4:
|
if len(msg.cmds) >= 4:
|
||||||
transport = msg.cmds[1]
|
transport = msg.cmds[1]
|
||||||
line = msg.cmds[2]
|
line = msg.cmds[2]
|
||||||
station = msg.cmds[3]
|
station = msg.cmds[3]
|
||||||
|
if len(msg.cmds) == 5:
|
||||||
|
times = ratp.getNextStopsAtStation(transport, line, station, msg.cmds[4])
|
||||||
|
else:
|
||||||
times = ratp.getNextStopsAtStation(transport, line, station)
|
times = ratp.getNextStopsAtStation(transport, line, station)
|
||||||
|
|
||||||
if len(times) == 0:
|
if len(times) == 0:
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 060aad3f42afe4185180e0ba952b72dc1cb4cac6
|
Subproject commit 3d5c9b2d52fbd214f5aaad00e5f3952de919b3e5
|
Loading…
Reference in New Issue
Block a user