Better, but still not perfect. :(

This commit is contained in:
Scott Ehlert 2006-09-13 13:44:37 +00:00
parent 6e56aed778
commit 918e1c3195
2 changed files with 15 additions and 5 deletions

View File

@ -288,7 +288,7 @@ public __is_module_running(plid, num)
get_string(1, module, 63) get_string(1, module, 63)
return is_module_loaded(module) return is_module_running(module)
} }
public __is_plugin_running(plid, num) public __is_plugin_running(plid, num)
@ -297,5 +297,5 @@ public __is_plugin_running(plid, num)
get_string(1, plugin, 63) get_string(1, plugin, 63)
return is_plugin_loaded(plugin) return is_plugin_running(plugin)
} }

View File

@ -297,12 +297,22 @@ stock get_plugincvarsnum(plugin[], flags=0)
return cvars_total; return cvars_total;
} }
stock is_module_running(const plugin[]) stock is_module_running(const module[])
{ {
return is_module_loaded(plugin); if (strcmp(module, "MySQL Access") == 0)
return LibraryExists("sqlx", LibType_Class);
return is_module_loaded(module) == -1 ? 0 : 1;
} }
stock is_plugin_running(const plugin[]) stock is_plugin_running(const plugin[])
{ {
return is_plugin_loaded(plugin); new status[8]
new id, filename[1], name[1], version[1], author[1]
id = is_plugin_loaded(plugin)
get_plugin(id, filename, 0, name, 0, version, 0, author, 0, status, 7)
return strcmp(status, "running") == 0 ? id + 1 : 0
} }