1.15 (06-Oct-2022)
- Walkaround rare SM bug
#1839, when SM reports incorrect plugin state, causing incorrect decision about "load" or "reload".
- Updated against warnings in SM 1.11, and futute 1.12, 1.13.
1.14 (27-Nov-2021)
- Potential fix for rare crash, caused by file system error.
- Improved DEBUG version in attempt to track the rare case with server crash caused by false positive time stamp change detection for all plugins at once.
1.13 (01-July-2021)
- Added command "sm_pluginsreload" - to force checking plugin files for newly updated (by SilverShot request).
- Added new allowed value "0" for "sm_autoreload_delay" ConVar - to disable checking plugins update by timer at all.
1.12 (09-May-2021)
- Little safe check to prevent error if < 4 character length filename for some reason is located at plugins folder.
1.11 (16-Apr-2021)
- Added TIMER_FLAG_NO_MAPCHANGE to prevent accidentally plugin double reload on map change.
- Added forwards (thanks to Silvers for request):
* AP_OnPluginUpdate - called when plugin list update sequence is about to start (or ended) - see the "started" argument to determine.
> This happens when 1 or more plugins are to be planned for loading/reloading/unloading.
> Example: when 10 plugins are changed simultaneously, this forward is called 2 times: 1 - very first before all other forward, then 2 - it is called as last, after all other forwards.
* AP_OnPluginLoad - called before and after plugin is loaded (no matter successfully or not - see the "pre" and "status" arguments for details).
> This happens when plugin wasn't loaded yet, or its previous loading failed.
* AP_OnPluginReload - called before and after plugin is reloaded (no matter successfully or not - see the "pre" and "status" arguments for details).
> This happens when plugin is already loaded at the moment.
* AP_OnPluginUnload
> This happens when plugin is removed, moved or renamed from its initial location.
* Notice 1: You can prevent plugins from load/reload/unload by returning Plugin_Stop in forward (it is only applicable for actions done directly by this plugin).
* Notice 2: these forwards doesn't report about actions made by other plugins including sourcemod itself, like:
> when you manually load/reload/unload plugin via console;
> when SM load/reload/unload plugin between OnMapEnd and OnMapStart events.
1.10 (05-Oct-2020)
- Fixed: not hooked dynamic change of "sm_autoreload_error_lines" ConVar.
1.9 (02-Apr-2020)
- Fixed Windows support. Reloader incorreclty selected load action type, because FindPluginByFile() can't normalize linux path separator (thanks to CrazyGhostRider for report).
- Plugin list is being updated now with newly added plugins on each map start (even if sm_autoreload_track_new == 0).
- Plugin reloading is blocked between map end and map start (for safe).
1.8 (22-Mar-2020)
- Attempt to indirectly recognize <Disabled> plugins to prevent both load / reload commands executing for each modified plugin (affected rcon double-msg only).
- Added reloading of translation files cache; can be triggered by any of plugins reload (Marttt suggestion).
- Added ability to display reload message to admins only: new ConVar "sm_autoreload_msg_flag" (e.g., useful to not distract the players).
- Added ability to disable reloader: new ConVar "sm_autoreload_enable" (e.g. useful when some plugin can surely crash the server due to "hot" reload).
1.7 (18-Mar-2020)
- Some non-essential message cleaning
1.6 (17-Mar-2020)
- Code is simplified, changed timing logic.
- Plugin load status is now always displayed (it's checked with 0.5 sec. delay after actual re-loading).
- Status description is simplified.
- Plugin change is now detected by file size as well.
- "sm_autoreload_delay" ConVar safe minimum is defined as 1.0 sec.
- Disabled load/reload selection logic based on plugin status, since FindPluginByFile returns 0 even if plugin is loaded but disabled. Now, reload + load is always executed together.
- Added ability to display in chat part of error log when plugin is failed to load (you can disable or adjust number of lines in "sm_autoreload_error_lines" ConVar).
- Added an option to display info in console only, see "sm_autoreload_show_info" description.
1.5 (16-Mar-2020)
- Better file uploading finish detection, so no more twice spam in error log (thanks to SilverShot).
- Some message misprints corrected.
1.4 (13-Mar-2020)
- Added better plugin deletion detection
- ArrayLists are replaced by StringMap (for optimization)
- some code and messages optimizaion.
1.3 (12-Mar-2020)
- Added one more plugin reload attempt in case it was previously reloaded at the same moment as file uploading progress is not finished
- Added displaying the status of reloaded plugin (if first attempt is failed).
- Added recurse scanning into subdirectories
- Added ability to track new files (activate it in "sm_autoreload_track_new" ConVar). By default, disabled to save performance.
- Added displaying info in chat (can be disabled by "sm_autoreload_show_info" ConVar).
Notice: you can also unload plugin by deleting the file or renaming extension e.g. into "plugin.smx.bak", or by moving it in "disabled" folder.
1.2 (22-Nov-2019)
- Converted to a new syntax and methodmaps
- Added ConVar "sm_autoreload_delay"
- Some code optimizations
1.1
- Added command "sm plugins load" in case plugin is not loaded last time due to startup error
1.0
- Original version by Timiditas:
https://forums.alliedmods.net/showthread.php?t=106320