diff options
Diffstat (limited to 'lib/Travelynx.pm')
-rwxr-xr-x | lib/Travelynx.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index ff75898..d313b25 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -332,8 +332,14 @@ sub startup { my $user = $self->get_user_status; if ( $user->{checked_in} or $user->{cancelled} ) { - # If a user is already checked in, we assume that they forgot to - # check out and do it for them. + if ( $user->{train_id} eq $train_id + and $user->{dep_ds100} eq $status->{station_ds100} ) + { + # checking in twice is harmless + return ( $train, undef ); + } + + # Otherwise, someone forgot to check out first $self->checkout( $station, 1 ); } |