A server-side addon that blocks malicious addons from running unwanted code, such as advertisement popups, and other invasive behaviors.
- Blocks known malicious addons based on Workshop ID
- Automatically removes blocked hooks and timers
- Overrides dangerous functions to prevent execution
- Auto-updates blacklist from remote server
- Supports server, client, and shared realms
- Download the latest release
- Extract to your Garry's Mod server's
garrysmod/addons/folder - The addon will automatically initialize on server start
lua/sl/adblock/
├── sh_config.lua # Configuration and settings
├── sh_logger.lua # Logging utilities
├── sh_data.lua # Blacklist data management
├── sh_blocker.lua # Function override system
├── sh_hooks.lua # Hook/timer removal
└── sh_init.lua # Initialization
All configuration is in sh_config.lua.
The remote URL to fetch blacklist data from. Should not be changed unless you host your own blacklist.
Number of seconds between retry attempts when removing hooks and timers. Default is 20.
Maximum number of retry attempts for removing hooks and timers. Default is 3.
The folder name used for local data storage. Default is "adware_block".
The full path to the local storage file. Default is "adware_block/data.json".
-- Set to debug for verbose logging
SL.AdBlock.Logger.SetLevel(SL.AdBlock.Logger.Levels.DEBUG)Available levels: DEBUG, INFO, WARN, ERROR
SL.AdBlock.FetchBlacklist(callback)- Fetch latest blacklist from serverSL.AdBlock.LoadFromStorage()- Load blacklist from local cacheSL.AdBlock.ApplyOverrides()- Apply function overrides for blocked addonsSL.AdBlock.ScanAddons(silent)- Scan installed addons and build blocklistSL.AdBlock.RemoveHooks(retryCount)- Remove blocked hooks (with retry)SL.AdBlock.RemoveTimers()- Remove blocked timersSL.AdBlock.OverrideFunction(funcName, blockedFiles)- Override a functionSL.AdBlock.FindAddonFiles(addonTitle)- Get files for an addon
SL.AdBlock.GetData()- Get current blacklist dataSL.AdBlock.HasData()- Check if data is loadedSL.AdBlock.GetFunctions()- Get blocked functionsSL.AdBlock.GetHooks()- Get hooks to removeSL.AdBlock.GetTimers()- Get timers to removeSL.AdBlock.GetAddons()- Get blocked addons
The addon fetches the latest blacklist from a remote server on startup. As long as your server has internet access, the blacklist stays current. No manual updates required.
- StarLight - Base code and refactor
- Nicolas - Workshop ID blocking
- Nykez - Dynamic data loading
- Luiggi33 - Fixed Steam HTTP error
- Herminatar - Icon base
- The Doctor - Addon discovery
- Vaas - Addon discovery
- woha - Addon discovery