File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 10
10
purpose =" Shows the MUSHclient help file"
11
11
save_state =" y"
12
12
date_written =" 2011-06-13 08:58:30"
13
- requires =" 4.75"
13
+ date_modified =" 2011-07-14 08:40:00"
14
+ requires =" 4.76"
14
15
version =" 1.0"
15
16
>
16
17
<description trim =" y" >
@@ -283,8 +284,11 @@ function general_help (search_string, want_snippet)
283
284
284
285
AnsiNote (RESET)
285
286
286
- assert (db, "No help database found")
287
-
287
+ if not db then
288
+ ColourNote ("red", "", "MUSHclient help database 'help.db' not found.")
289
+ return
290
+ end -- if
291
+
288
292
local count = 0
289
293
local functions = {}
290
294
local general = {}
@@ -409,6 +413,19 @@ function OnPluginInstall ()
409
413
db = assert (sqlite3.open(GetInfo (66) .. "help.db"))
410
414
end -- if
411
415
416
+ local commands = false
417
+
418
+ -- see if commands table exists
419
+ for row in db:nrows("SELECT * FROM sqlite_master WHERE type = 'table' AND name = 'commands'") do
420
+ commands = true
421
+ end
422
+
423
+ if not commands then
424
+ ColourNote ("red", "", "MUSHclient help database 'help.db' not found.")
425
+ db:close ()
426
+ db = nil
427
+ return
428
+ end -- if
412
429
413
430
local fts4 = false
414
431
You can’t perform that action at this time.
0 commit comments