# Developer Change Log - AM DLL

June 15, 2001: Changes made for version 2.50e

- Added system error reports to CPlugin::LoadFile() function.

- Added the plugin_exec() function.

- Fixed the bot_protection in teleport() not showing special fx.

- Added #pragma pack() to the end of amx.h to stop the packing.

- Tried to move include directives so that amx.h always gets included last. This enabled MySQL support under Windows.

- Fixed a bug in timer.cpp::IsValidTimer() checking for the wrong constant.

- Fixed a bug in the bad name detection. make_friendly replaces % now with spaces instead of deleting them.

- Fixed a bug in the logging functions of centersay et al which messed up the formatting.

June 2, 2001: Changes since the admin-2_50-release CVS tag

CLinkList.cpp:

CLinkList.h:

The linked list and list item classes have been converted to templates. This is necessary because we can't use a void* pointer to store data in the items. Using a void* pointer will cause a memory leak since the destructor of an object stored will not be called. The template declaration includes an argument to specify if the list item object will be used to store a single element or an array of elements. This is necessary to call the correct delete operator on destruction. All other files have been adapted to use the templates. I removed some C-type casts which are unnecessary when using the templates. We should gradually change to C++-type casts if they are necessary.

The insertion was fixed which fixes a bug of registered commands not showing up in admin_help.

Makefile:

- Well, just a little cleanup, removing the double (and wrong) optimization flags. Removed linkfunc.ccp from the MM build.

admin_commands.cpp:

- The wrong time bug in ban() has been fixed. Log string size has been increased to LARGE_BUF_SIZE.

- Added debug message to plugin_register*() functions.

- tsay(), centersay() and rainbow() messages get logged in the logs with newlines replaced with "\n" strings.

- vote_multiple() function displays all options, not only the last one.

- Added const_casts on STRING() calls in order to use the original HLSDK STRING() function and get rid of those compiler warnings.

- Jag moved the contents of the getteamcount() function around. =)

- Added slay() function which is independent from the setting of allow_execclient.

- Added more bot protections if admin_bot_protection is on. It should work now also if admin_fx is turned on.

- Fixed gettarget() and pointto() crashes under Linux. The Linux version of CS and TFC don't like the HLSDK EyePosition() function.

admin_mod.cpp:

- Cvars added: admin_repeat_freq, admin_vote_echo, amv_autoban. Other CVars have changed default settings: admin_connect_msg, admin_repeat_msg.

- AM_ClientConnect(): Setting some structures to 0 seems to have fixed that mysterious crash when compiling optimized.

- Check for player names with non-printable characters. They are denied access. If they change name in mid-game, their HL is closed on the client machine and a 24h ban issued depending on the setting of amv_autoban.

- Metamod stuff changed to match new interface version.

- Added MM function GetEngineFunctions_Post()

- Changed DispatchObjectCollsionBox() to hide the timer entity.

extdll.h:

- Fixed MSVC compiling problems when compiling in DEBUG mode and added #pragma warning(disable : 4018) to hide the signed/unsigned mismatch warnings.

- Adapted to use the original STRING() function and updated functions UTIL_LogPrintfFNL() and make_friendly().

hexport.cpp:

- Catches engine functions to hide the timer entity. This removed the crashes in TFC.

make_pass:

- Updated to better make use of the new encryption scheme, improving usability.

MSVC schtuff:

- Oh well, updated the workspace files to work. Added resource file adminmod.rc which adds a version information to the Windows DLL.

timer.h:

timer.cpp:

- Added MaxVoteChoice member and access functions. Updated the StartVote() function to use ChoiceCount.

users.cpp:

- Removed ' * ' from the list of comment characters.

- MySQL fixes from Jon Paul Nollmann.

- Most changes are to use the new templates.

users.h:

- Added DEBUG_LOG and DEVEL_LOG macros to make it easier to log debug messages.

util.cpp:

- Changed make_friendly() to check for non-printable characters. The check is optional and can be enabled with the second.

- Added UTIL_LogPrintfFNL() function which acts like UTIL_LogPrintf() but converts newlines within the string to "\n" literals, if there is enough space in the array, else they are replaced with blanks.

- UTIL_LogPrintf() uses vsnprintf() instead of vnprintf() to prevent buffer overflow.

- CLIENT_PRINTF() replaced with SystemResponse(), fixing crash when the player lookup function found more than one match on a partial name.