metamod/mlist.cpp
changeset 245 e2e3739f6ccd
parent 244 7b246a2ad39c
child 247 2b1bf332bf41
     1.1 --- a/metamod/mlist.cpp	Thu Aug 19 21:41:18 2004 +0000
     1.2 +++ b/metamod/mlist.cpp	Sat Aug 21 16:13:14 2004 +0000
     1.3 @@ -308,7 +308,7 @@
     1.4  		// Check for a duplicate - an existing entry with this pathname.
     1.5  		if(find(plist[n].pathname)) {
     1.6  			// Should we check platform specific level here?
     1.7 -			META_ERROR("ini: Skipping duplicate plugin, line %d of %s: %s", 
     1.8 +			META_INFO("ini: Skipping duplicate plugin, line %d of %s: %s", 
     1.9  					ln, inifile, plist[n].pathname);
    1.10  			continue;
    1.11  		}
    1.12 @@ -317,11 +317,11 @@
    1.13  		if(NULL != (pmatch=find_match(&plist[n]))) {
    1.14  			if(pmatch->pfspecific >= plist[n].pfspecific) {
    1.15  				META_DEBUG(1, ("ini: Skipping plugin, line %d of %s: plugin with higher platform specific level already exists. (%d >= %d)",
    1.16 -                         n, inifile, pmatch->pfspecific, plist[n].pfspecific)); 
    1.17 +                         ln, inifile, pmatch->pfspecific, plist[n].pfspecific)); 
    1.18  				continue;
    1.19  			}
    1.20  			META_DEBUG(1, ("ini: Plugin in line %d overrides existing plugin with lower platform specific level %d, ours %d",
    1.21 -					n, pmatch->pfspecific, plist[n].pfspecific));
    1.22 +					ln, pmatch->pfspecific, plist[n].pfspecific));
    1.23  			memset(pmatch, 0, sizeof(MPlugin));
    1.24  		}
    1.25  		plist[n].action=PA_LOAD;
    1.26 @@ -386,9 +386,16 @@
    1.27                         		 ln, inifile, pl_found->pfspecific, pl_temp.pfspecific)); 
    1.28  					continue;
    1.29  				}
    1.30 -				META_DEBUG(1, ("ini: Plugin in line %d should override existing plugin with lower platform specific level %d, ours %d",
    1.31 -							ln, pl_found->pfspecific, pl_temp.pfspecific));
    1.32 -				continue;
    1.33 +				if(PA_LOAD == pl_found->action) {
    1.34 +					META_DEBUG(1, ("ini: Plugin in line %d overrides loading of plugin with lower platform specific level %d, ours %d",
    1.35 +								ln, pl_found->pfspecific, pl_temp.pfspecific));
    1.36 +					memset(pl_found, 0, sizeof(MPlugin));
    1.37 +				}
    1.38 +				else {
    1.39 +					META_DEBUG(1, ("ini: Plugin in line %d should override existing plugin with lower platform specific level %d, ours %d. Unable to comply.",
    1.40 +								ln, pl_found->pfspecific, pl_temp.pfspecific));
    1.41 +					continue;
    1.42 +				}
    1.43  			}
    1.44  			// new plugin; add to list
    1.45  			if((pl_added=add(&pl_temp))) {
    1.46 @@ -429,7 +436,12 @@
    1.47  				META_ERROR("ini: Plugin '%s' has newer file, but unexpected status (%s)",
    1.48  						pl_found->desc, pl_found->str_status());
    1.49  		}
    1.50 -		META_LOG("ini: Read plugin config for: %s", plist[n].desc);
    1.51 +		if(NULL != pl_found) {
    1.52 +			META_LOG("ini: Read plugin config for: %s", pl_found->desc);
    1.53 +		}
    1.54 +		else {
    1.55 +			META_LOG("ini: Read plugin config for: %s", pl_temp.desc);
    1.56 +		}
    1.57  		n++;
    1.58  	}
    1.59  	META_LOG("ini: Finished reading plugins list: %s; Found %d plugins", inifile, n);