[nextstop] Updated nextstop with destination option
This commit is contained in:
parent
b75c54419f
commit
6e226f0fb3
@ -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))
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 060aad3f42afe4185180e0ba952b72dc1cb4cac6
|
||||
Subproject commit 3d5c9b2d52fbd214f5aaad00e5f3952de919b3e5
|
Loading…
Reference in New Issue
Block a user