diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/evendoors.rb | 1 | ||||
-rw-r--r-- | lib/evendoors/room.rb | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/evendoors.rb b/lib/evendoors.rb index 6ea8644..e8d7047 100644 --- a/lib/evendoors.rb +++ b/lib/evendoors.rb @@ -23,6 +23,7 @@ module EvenDoors ERROR_ROUTE_NDN = 'routing error: no door name'.freeze ERROR_ROUTE_NMD = 'routing error: no more destination'.freeze ERROR_ROUTE_RRWD = 'routing error: right room, wrong door'.freeze + ERROR_ROUTE_RRNDD = 'routing error: right room, no drill down'.freeze ERROR_ROUTE_TRWR = 'routing error: top room, wrong room'.freeze ERROR_ROUTE_NDNS = 'routing error: no destination, no source'.freeze ERROR_ROUTE_NDNL = 'routing error: no destination, no link'.freeze diff --git a/lib/evendoors/room.rb b/lib/evendoors/room.rb index fdee3e7..6e464d2 100644 --- a/lib/evendoors/room.rb +++ b/lib/evendoors/room.rb @@ -83,6 +83,9 @@ module EvenDoors else p.error! EvenDoors::ERROR_ROUTE_RRWD end + elsif (p.room=~/^#{path}/)==0 + # TODO allow drill down ?!? + p.error! EvenDoors::ERROR_ROUTE_RRNDD elsif @parent @parent.route_p p else |