@@ -46,7 +46,7 @@ room info should include:
4646
4747module (... , package.seeall )
4848
49- VERSION = 1.1 -- for querying by plugins
49+ VERSION = 1.2 -- for querying by plugins
5050
5151require " movewindow"
5252require " copytable"
@@ -201,9 +201,20 @@ local function get_room (uid)
201201 return room
202202end -- get_room
203203
204+ local function check_connected ()
205+ if not IsConnected () then
206+ mapprint (" You are not connected to" , WorldName ())
207+ return false
208+ end -- if not connected
209+ return true
210+ end -- check_connected
204211
205212function start_speedwalk (path )
206213
214+ if not check_connected () then
215+ return
216+ end -- if
217+
207218 if current_speedwalk and # current_speedwalk > 0 then
208219 mapprint (" You are already speedwalking! (Ctrl + LH-click on any room to cancel)" )
209220 return
@@ -801,6 +812,11 @@ local function changed_room (uid)
801812end -- changed_room
802813
803814function check_we_can_find ()
815+
816+ if not check_connected () then
817+ return
818+ end -- if
819+
804820 if not current_room then
805821 mapprint (" I don't know where you are right now - try: LOOK" )
806822 return false
@@ -1294,7 +1310,11 @@ function find (f, show_uid, expected_count, walk)
12941310end -- map_find_things
12951311
12961312function do_hyperlink (hash )
1297-
1313+
1314+ if not check_connected () then
1315+ return
1316+ end -- if
1317+
12981318 if not hyperlink_paths or not hyperlink_paths [hash ] then
12991319 mapprint (" Hyperlink is no longer valid, as you have moved." )
13001320 return
@@ -1305,6 +1325,5 @@ function do_hyperlink (hash)
13051325 last_hyperlink_uid = path [# path ].uid
13061326 end -- if
13071327 start_speedwalk (path )
1308-
13091328
13101329end -- do_hyperlink
0 commit comments