4
4
5
5
function do_plugin_check_now (id , name )
6
6
7
- local me
8
- local location
7
+ local me -- who am I? plugin or main world script?
8
+ local location -- location to attempt to load plugin from
9
9
10
10
-- allow for being called from main world script
11
11
if GetPluginID () == " " then
@@ -23,31 +23,33 @@ function do_plugin_check_now (id, name)
23
23
24
24
if IsPluginInstalled (id ) then
25
25
ColourNote (" white" , " green" , " Success!" )
26
-
27
- -- now make sure enabled (suggested by Fiendish - version 4.74+ )
28
-
29
- if not GetPluginInfo (id , 17 ) then
30
- ColourNote (" white" , " green" , " Plugin '" .. name .. " ' not enabled. Attempting to enable it..." )
31
- EnablePlugin (id , true )
32
- if GetPluginInfo (id , 17 ) then
33
- ColourNote (" white" , " green" , " Success!" )
34
- else
35
- ColourNote (" white" , " red" , string.rep (" -" , 80 ))
36
- ColourNote (" white" , " red" , " Plugin '" .. name .. " ' not enabled. Please make sure it can be enabled." )
37
- ColourNote (" white" , " red" , " It is required for the correct operation of the " .. me )
38
- ColourNote (" white" , " red" , string.rep (" -" , 80 ))
39
- end -- if
40
- end -- if not enabled
41
26
42
27
-- here if still not installed
43
28
else
44
29
ColourNote (" white" , " red" , string.rep (" -" , 80 ))
45
30
ColourNote (" white" , " red" , " Plugin '" .. name .. " ' not installed. Please download and install it." )
46
31
ColourNote (" white" , " red" , " It is required for the correct operation of the " .. me )
47
32
ColourNote (" white" , " red" , string.rep (" -" , 80 ))
33
+ return -- skip enabled check
48
34
end -- if not installed
49
35
end -- plugin was not installed
50
36
37
+
38
+ -- now make sure enabled (suggested by Fiendish - version 4.74+ )
39
+
40
+ if not GetPluginInfo (id , 17 ) then
41
+ ColourNote (" white" , " green" , " Plugin '" .. name .. " ' not enabled. Attempting to enable it..." )
42
+ EnablePlugin (id , true )
43
+ if GetPluginInfo (id , 17 ) then
44
+ ColourNote (" white" , " green" , " Success!" )
45
+ else
46
+ ColourNote (" white" , " red" , string.rep (" -" , 80 ))
47
+ ColourNote (" white" , " red" , " Plugin '" .. name .. " ' not enabled. Please make sure it can be enabled." )
48
+ ColourNote (" white" , " red" , " It is required for the correct operation of the " .. me )
49
+ ColourNote (" white" , " red" , string.rep (" -" , 80 ))
50
+ end -- if
51
+ end -- if not enabled
52
+
51
53
end -- do_plugin_check_now
52
54
53
55
0 commit comments