1.1 --- a/doc/Changelog Thu Aug 19 21:41:18 2004 +0000
1.2 +++ b/doc/Changelog Sat Aug 21 16:13:14 2004 +0000
1.3 @@ -23,7 +23,9 @@
1.4 "_amd64.so" instead of "_i386.so") in AMD64 Metamod version.
1.5 - Added "lin32" and "lin64" keywords in addition to "linux" keyword for
1.6 plugins.ini file to support using the same file for the same game on
1.7 - both 32bit and 64bit servers.
1.8 + both 32bit and 64bit servers. The "lin32" and "lin64" keywords override
1.9 + the "linux" keyword when used on the same plugin. Do not use "linux"
1.10 + when using "lin32" and/or "lin64" keywords for the same plugin.
1.11 - Internal changes:
1.12 - Changed Makefile to use different object files directory on AMD64
1.13 build machines and "_amd64.so" extension for AMD64 Metamod.
2.1 --- a/metamod/log_meta.cpp Thu Aug 19 21:41:18 2004 +0000
2.2 +++ b/metamod/log_meta.cpp Sat Aug 21 16:13:14 2004 +0000
2.3 @@ -78,6 +78,28 @@
2.4 ALERT(at_logged, "[META] dev: %s\n", buf);
2.5 }
2.6
2.7 +// Log infos.
2.8 +void META_INFO(char *fmt, ...) {
2.9 + va_list ap;
2.10 + char buf[MAX_LOGMSG_LEN];
2.11 +
2.12 + va_start(ap, fmt);
2.13 + vsnprintf(buf, sizeof(buf), fmt, ap);
2.14 + va_end(ap);
2.15 + ALERT(at_logged, "[META] INFO: %s\n", buf);
2.16 +}
2.17 +
2.18 +// Log warnings.
2.19 +void META_WARNING(char *fmt, ...) {
2.20 + va_list ap;
2.21 + char buf[MAX_LOGMSG_LEN];
2.22 +
2.23 + va_start(ap, fmt);
2.24 + vsnprintf(buf, sizeof(buf), fmt, ap);
2.25 + va_end(ap);
2.26 + ALERT(at_logged, "[META] WARNING: %s\n", buf);
2.27 +}
2.28 +
2.29 // Log errors.
2.30 void META_ERROR(char *fmt, ...) {
2.31 va_list ap;
3.1 --- a/metamod/log_meta.h Thu Aug 19 21:41:18 2004 +0000
3.2 +++ b/metamod/log_meta.h Sat Aug 21 16:13:14 2004 +0000
3.3 @@ -86,6 +86,8 @@
3.4
3.5 void META_CONS(char *fmt, ...);
3.6 void META_DEV(char *fmt, ...);
3.7 +void META_INFO(char *fmt, ...);
3.8 +void META_WARNING(char *fmt, ...);
3.9 void META_ERROR(char *fmt, ...);
3.10 void META_LOG(char *fmt, ...);
3.11 void META_CLIENT(edict_t *pEntity, char *fmt, ...);
4.1 --- a/metamod/mlist.cpp Thu Aug 19 21:41:18 2004 +0000
4.2 +++ b/metamod/mlist.cpp Sat Aug 21 16:13:14 2004 +0000
4.3 @@ -308,7 +308,7 @@
4.4 // Check for a duplicate - an existing entry with this pathname.
4.5 if(find(plist[n].pathname)) {
4.6 // Should we check platform specific level here?
4.7 - META_ERROR("ini: Skipping duplicate plugin, line %d of %s: %s",
4.8 + META_INFO("ini: Skipping duplicate plugin, line %d of %s: %s",
4.9 ln, inifile, plist[n].pathname);
4.10 continue;
4.11 }
4.12 @@ -317,11 +317,11 @@
4.13 if(NULL != (pmatch=find_match(&plist[n]))) {
4.14 if(pmatch->pfspecific >= plist[n].pfspecific) {
4.15 META_DEBUG(1, ("ini: Skipping plugin, line %d of %s: plugin with higher platform specific level already exists. (%d >= %d)",
4.16 - n, inifile, pmatch->pfspecific, plist[n].pfspecific));
4.17 + ln, inifile, pmatch->pfspecific, plist[n].pfspecific));
4.18 continue;
4.19 }
4.20 META_DEBUG(1, ("ini: Plugin in line %d overrides existing plugin with lower platform specific level %d, ours %d",
4.21 - n, pmatch->pfspecific, plist[n].pfspecific));
4.22 + ln, pmatch->pfspecific, plist[n].pfspecific));
4.23 memset(pmatch, 0, sizeof(MPlugin));
4.24 }
4.25 plist[n].action=PA_LOAD;
4.26 @@ -386,9 +386,16 @@
4.27 ln, inifile, pl_found->pfspecific, pl_temp.pfspecific));
4.28 continue;
4.29 }
4.30 - META_DEBUG(1, ("ini: Plugin in line %d should override existing plugin with lower platform specific level %d, ours %d",
4.31 - ln, pl_found->pfspecific, pl_temp.pfspecific));
4.32 - continue;
4.33 + if(PA_LOAD == pl_found->action) {
4.34 + META_DEBUG(1, ("ini: Plugin in line %d overrides loading of plugin with lower platform specific level %d, ours %d",
4.35 + ln, pl_found->pfspecific, pl_temp.pfspecific));
4.36 + memset(pl_found, 0, sizeof(MPlugin));
4.37 + }
4.38 + else {
4.39 + META_DEBUG(1, ("ini: Plugin in line %d should override existing plugin with lower platform specific level %d, ours %d. Unable to comply.",
4.40 + ln, pl_found->pfspecific, pl_temp.pfspecific));
4.41 + continue;
4.42 + }
4.43 }
4.44 // new plugin; add to list
4.45 if((pl_added=add(&pl_temp))) {
4.46 @@ -429,7 +436,12 @@
4.47 META_ERROR("ini: Plugin '%s' has newer file, but unexpected status (%s)",
4.48 pl_found->desc, pl_found->str_status());
4.49 }
4.50 - META_LOG("ini: Read plugin config for: %s", plist[n].desc);
4.51 + if(NULL != pl_found) {
4.52 + META_LOG("ini: Read plugin config for: %s", pl_found->desc);
4.53 + }
4.54 + else {
4.55 + META_LOG("ini: Read plugin config for: %s", pl_temp.desc);
4.56 + }
4.57 n++;
4.58 }
4.59 META_LOG("ini: Finished reading plugins list: %s; Found %d plugins", inifile, n);
5.1 --- a/metamod/mplugin.cpp Thu Aug 19 21:41:18 2004 +0000
5.2 +++ b/metamod/mplugin.cpp Sat Aug 21 16:13:14 2004 +0000
5.3 @@ -66,6 +66,10 @@
5.4 // skip whitespace at start of line
5.5 while(*line==' ' || *line=='\t' ) line++;
5.6
5.7 + // remove whitespace at end of line
5.8 + cp = line + strlen(line) -1;
5.9 + while(*cp==' ' || *cp=='\t') *cp--='\0';
5.10 +
5.11 // skip empty lines
5.12 if(line[0]=='\0') {
5.13 META_DEBUG(7, ("ini: Ignoring empty line: %s", line));