Moved LoadPlugins, GetPlugin and ParsePlugin from
users.cpp to CPlugin.
Moved the LoadFile and LoadTable templates to
CPlugin.h because they are needed by both CPlugin.cpp
and users.cpp. Users.cpp includes CPlugin.h so moving
it to CPlugin.h seemed the nicest temporary solution
without adding extra files or includes.
Made more CPlugin functions private, possible since
the above functions moved into CPlugin.
Made the accessfunctions in CPlugin return a const
char* instead of a char*. tried to make them inline
too, but that gave errors when metamod tried to load AM.
Removed support for script_file. This includes
removing the g_fRunScripts global variable.
Other changes can be found in the patchfile.
The edited code compiles without warnings with gcc
3.2.2, both the normal and mysql version. I tested the
normal code a bit and it seems to work: It loads the
plugins without problems.
patch.txt
full patch with all the changes.
Logged In: YES
user_id=676699
Moved m_PluginList and m_HelpList into CPlugin, made them
static and not dynamic. Removed the now redundant NULL
checks (9 or so).
Made the access functions of CPlugin inline in the header:
making them inline with the inline keyword didn't work for
some reason.
Edited HandleVersion in users.cpp so it doesn't copy the
strings, it uses pointers now.
Updated patch