source: trunk/plugins/complex.tcl @ 1143

Revision 942, 1.3 KB checked in by james, 4 years ago (diff)

use proper array initialisation, now I know how!
reindent

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1## bMotion plugins loader: complex
2#
3
4###############################################################################
5# This is a bMotion module
6# Copyright (C) James Michael Seward 2000-2008
7#
8# This program is covered by the GPL, please refer the to LICENCE file in the
9# distribution; further information can be found in the headers of the scripts
10# in the modules directory.
11###############################################################################
12
13set currentlang $bMotionInfo(language)
14set languages [split $bMotionSettings(languages) ","]
15
16foreach bMotion_language $languages {
17        set bMotionInfo(language) $bMotion_language
18        bMotion_putloglev 2 * "bMotion: loading complex plugins language = $bMotion_language"
19        set files [glob -nocomplain "$bMotionPlugins/$bMotion_language/complex_*.tcl"]
20
21        foreach f $files {
22                set count [llength [array names bMotion_plugins_complex]]
23                set bMotion_noplugins 0
24                bMotion_putloglev 1 * "bMotion: loading ($bMotion_language) complex plugin file $f"
25                catch {
26                        source $f
27                } err
28                set newcount [llength [array names bMotion_plugins_complex]]
29                if {($bMotion_testing == 0) && ($newcount == $count) && ($bMotion_noplugins == 0)} {
30                        putlog "bMotion: ALERT! complex plugin file $f added no plugins"
31                        putlog "Possible error: $err"
32                }
33        }
34}
35
36set bMotionInfo(language) $currentlang
37unset currentlang
Note: See TracBrowser for help on using the repository browser.